marcgibbons / django-rest-framework-docs

An inventory tool for Django Rest Framework v2 API endpoints
BSD 2-Clause "Simplified" License
95 stars 34 forks source link

Not compatible with Django 1.10 ImportError: cannot import name patterns #25

Open kasravnd opened 8 years ago

kasravnd commented 8 years ago

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
electrocoder commented 7 years ago

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

mohitsaroha03 commented 7 years ago

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')), ]