ecop icon indicating copy to clipboard operation
ecop copied to clipboard

from django.core.urlresolvers import reverse ModuleNotFoundError: No module named 'django.core.urlresolvers'

Open syedalizain033 opened this issue 4 years ago • 3 comments
trafficstars

While running server via command "python manage.py runserver", the file gives us an error on the terminal/cmd.exe as given below. from django.core.urlresolvers import reverse ModuleNotFoundError: No module named 'django.core.urlresolvers'

Searching it on stackoverflow, I found an answer I have shared below. "Note that Django 2.0 removes some features that previously were in django.core.urlresolvers, so you might have to make some more changes before your code works. " It clearly defines that there is dnajgo version issue which I'm facing while testing this project. I am even unable to run the server. If you have any solution for that like if you can update the code, this would be a really appreciable effort.

syedalizain033 avatar Dec 23 '20 09:12 syedalizain033

So, you can get this easily resolved by opening the models.py in crime files folder and there you change from django.core.urlresolvers import reverse

to:

from django.urls import reverse

Then it will resolve the error

Hope it works!!!

napster-ansh avatar Dec 24 '20 09:12 napster-ansh

updating django versin is long overdue, but this project is not a priority atm. If you can please do make changes and make a MR

gauthamzz avatar Dec 27 '20 19:12 gauthamzz

I'll try my best for the same , but i am stuck at this : TypeError: view must be a callable or a list/tuple in the case of include(). i am getting this while importing your views module , on running with python manage.py runserver pls help me out.

napster-ansh avatar Dec 28 '20 05:12 napster-ansh