We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 112674b + 694a3e1 commit a1ad2d7Copy full SHA for a1ad2d7
rest_framework_docs/api_docs.py
@@ -1,5 +1,6 @@
1
from django.conf import settings
2
from django.core.urlresolvers import RegexURLResolver, RegexURLPattern
3
+from django.utils.module_loading import import_string
4
from rest_framework.views import APIView
5
from rest_framework_docs.api_endpoint import ApiEndpoint
6
@@ -8,7 +9,7 @@ class ApiDocumentation(object):
8
9
10
def __init__(self):
11
self.endpoints = []
- root_urlconf = __import__(settings.ROOT_URLCONF)
12
+ root_urlconf = import_string(settings.ROOT_URLCONF)
13
if hasattr(root_urlconf, 'urls'):
14
self.get_all_view_names(root_urlconf.urls.urlpatterns)
15
else:
0 commit comments