ImportError: No module named 'django.core.urlresolvers' ImportError: No module named 'django.core.urlresolvers' python-3.x python-3.x

ImportError: No module named 'django.core.urlresolvers'


Django 2.0 removes the django.core.urlresolvers module, which was moved to django.urls in version 1.10. You should change any import to use django.urls instead, like this:

from django.urls import reverse

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. See the features deprecated in 1.9 for details on those additional changes.


if you want to import reverse, import it from django.urls

from django.urls import reverse


You need replace all occurrences of:

from django.core.urlresolvers import reverse

to:

from django.urls import reverse

enter image description here

NOTE: The same apply to reverse_lazy

in Pycharm Cmd+Shift+R for starting replacment in Path.