ModuleNotFoundError: No module named 'django.core.urlresolvers' on python 3.6.3
sadaf2605 opened this issue · comments
File "/Users/sadafnoor/.pyenv/versions/evaly3.6.3/lib/python3.6/site-packages/autoslug/__init__.py", line 11, in <module>
from autoslug.fields import AutoSlugField
File "/Users/sadafnoor/.pyenv/versions/evaly3.6.3/lib/python3.6/site-packages/autoslug/fields.py", line 29, in <module>
from autoslug.settings import slugify, autoslug_modeltranslation_enable
File "/Users/sadafnoor/.pyenv/versions/evaly3.6.3/lib/python3.6/site-packages/autoslug/settings.py", line 61, in <module>
from django.core.urlresolvers import get_callable
ModuleNotFoundError: No module named 'django.core.urlresolvers'
This is with Django 2.0, change 'django.core.urlresolvers' to 'django.urls'
The package isn't updated to support Django 2.0
try:
from django.core.urlresolvers import get_callable
except ModuleNotFoundError:
from django.urls import get_callable
I am getting the same error with django 2.0.5
Using django-autoslug-iplweb==1.9.4
with Python 3.6.6 + Django 2.1.1 worked for me. Thanks @barseghyanartur.
Please release the master branch.
django-autoslug v1.9.4, which should now support Django 1.10, 1.11, and 2.0+, has been released and published to PyPI. The documentation will be updated once ownership of the corresponding ReadTheDocs project has been transferred. (Link to transfer request)
Thanks to everyone for your patience! 🎉