django-rest-framework-docs icon indicating copy to clipboard operation
django-rest-framework-docs copied to clipboard

django.utils.importlib deprecated in Django 1.7

Open g33klord opened this issue 9 years ago • 2 comments

Django doc says django.utils.importlib deprecated in Django 1.7

https://docs.djangoproject.com/en/1.7/releases/1.7/#features-deprecated-in-1-7

File "/Users/user/some/directory/project/project/urls.py", line 12, in <module>
   url(r'^api/docs/v1/', include('rest_framework_docs.urls')),
 File "/Users/user/.virtualenvs/venv/lib/python2.7/site-packages/django/conf/urls/__init__.py", line 52, in include
   urlconf_module = import_module(urlconf_module)
 File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
   __import__(name)
 File "/Users/user/.virtualenvs/venv/lib/python2.7/site-packages/rest_framework_docs/urls.py", line 2, in <module>
   from views import documentation
 File "/Users/user/.virtualenvs/venv/lib/python2.7/site-packages/rest_framework_docs/views.py", line 1, in <module>
   from docs import DocumentationGenerator
 File "/Users/user/.virtualenvs/venv/lib/python2.7/site-packages/rest_framework_docs/docs.py", line 4, in <module>
   from django.utils.importlib import import_module

ImportError: No module named importlib

g33klord avatar May 17 '16 11:05 g33klord

Same error with Django 1.9.7

exos avatar Jul 13 '16 20:07 exos

please use https://github.com/marcgibbons/django-rest-swagger

electrocoder avatar Apr 29 '17 09:04 electrocoder