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

Not compatible with Django 1.10 ImportError: cannot import name patterns

Open kasravnd opened this issue 9 years ago • 2 comments

Since the patterns are removed from Django 1.10 it raises the following error with this version:

  File "/usr/local/lib/python2.7/dist-packages/rest_framework_docs/urls.py", line 1, in <module>
    from django.conf.urls import patterns, include, url
ImportError: cannot import name patterns

kasravnd avatar Oct 08 '16 09:10 kasravnd

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

electrocoder avatar Apr 29 '17 09:04 electrocoder

Try drfdocs instead of django-rest-framework-docs Install using pip:

pip install drfdocs

it stands for django rest framework docs Add 'rest_framework_docs' to your INSTALLED_APPS setting: INSTALLED_APPS = ( 'rest_framework_docs', ) Finally include the rest_framework_docs urls in your urls.py: urlpatterns = [ url(r'^docs/', include('rest_framework_docs.urls')), ]

mohitsaroha03 avatar Aug 25 '17 07:08 mohitsaroha03