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.
No module named 'django.core.urlresolvers when using uni_form
django-uni-form has not been developed for years. As the project page says, you should use django-crispy-forms instead.
No module named django.core.urlresovers in django 2.0a1
In Django 2.0 you must import:from django.urls import reverse_lazy
I'm getting error when trying to import reserve from urlresolver
From Django 1.10+, the import has changed to:
from django.urls import reverse
However, the old import should still work in Django 1.10 and 1.11.
If the old import is giving you an error, that suggests that either your Django install is broken, or you have installed the master branch of Django (which will become 2.0). I would avoid using the master branch.
If possible, use the same Django version that the tutorial was written for, otherwise you might hit more problems like this. If the tutorial was written for Django < 1.8 then I would avoid it, as it is out of date.
Related Topics
Why Do I Need to Deploy a "Default" App Before I Can Deploy Multiple Services in Gae
Keep Same Dummy Variable in Training and Testing Data
Generalise Slicing Operation in a Numpy Array
Add Column with Constant Value to Pandas Dataframe
Check If a Given Key Already Exists in a Dictionary and Increment It
Finding a Substring Within a List in Python
What Is the Best Approach to Change Primary Keys in an Existing Django App
Multithreaded Web Server in Python
Differencebetween JSON.Load() and JSON.Loads() Functions
Why Does CSVwriter.Writerow() Put a Comma After Each Character
How to Return a Subset of a List That Matches a Condition
How to Add a Custom Loglevel to Python's Logging Facility
How to Run Python Script on Terminal
Find Out How Many Times a Regex Matches in a String in Python