I am working on Django project where I need to create a form for inputs. I tried to import reverse
from django.core.urlresolvers
. I got an error:
use this one:
from django.urls import reverse
use from django.urls import reverse instead of from django.core.urlresolvers import reverse
If your builds on TravisCI are failing for this particular reason, you can resolve the issue by updating the Django Extensions in your requirements.txt
pip install --upgrade django-extensions
This will update the extensions to use Django 2+ modules.
To solve this either you down-grade the Django
to any version lesser than 2.0.
pip
install Django==1.11.29
.
urlresolver has been removed in the higher version of Django - Please upgrade your django installation. I fixed it using the following command.
pip install django==2.0 --upgrade