From 0f89e4494af8ba41bc83130174924b1bfadf9cc0 Mon Sep 17 00:00:00 2001 From: Emmanouil Konstantinidis Date: Mon, 21 Dec 2015 15:03:15 +0000 Subject: [PATCH 1/2] Catch both cases of common ROOT_URLCONF --- rest_framework_docs/api_docs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rest_framework_docs/api_docs.py b/rest_framework_docs/api_docs.py index 844a37d..6e9028a 100644 --- a/rest_framework_docs/api_docs.py +++ b/rest_framework_docs/api_docs.py @@ -9,7 +9,10 @@ class ApiDocumentation(object): def __init__(self): self.endpoints = [] root_urlconf = __import__(settings.ROOT_URLCONF) - self.get_all_view_names(root_urlconf.urls.urlpatterns) + if hasattr(root_urlconf, 'urls'): + self.get_all_view_names(root_urlconf.urls.urlpatterns) + else: + self.get_all_view_names(root_urlconf.urlpatterns) def get_all_view_names(self, urlpatterns, parent_pattern=None): for pattern in urlpatterns: From dd5a310f2f385a6447888df72f31da9a5a541d46 Mon Sep 17 00:00:00 2001 From: Emmanouil Konstantinidis Date: Mon, 21 Dec 2015 15:22:30 +0000 Subject: [PATCH 2/2] Bump 0.0.5 --- rest_framework_docs/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework_docs/__init__.py b/rest_framework_docs/__init__.py index 156d6f9..eead319 100644 --- a/rest_framework_docs/__init__.py +++ b/rest_framework_docs/__init__.py @@ -1 +1 @@ -__version__ = '0.0.4' +__version__ = '0.0.5'