id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 31527,Admindocs' View index assumes settings.ROOT_URLCONF is an import string,Keryn Knight,Qihao(Jim) Xie,"Currently, the code looks like: {{{ urlconf = import_module(settings.ROOT_URLCONF) view_functions = extract_views_from_urlpatterns(urlconf.urlpatterns) }}} Buuuuuuuut, it's possible to get Django to otherwise run with, for example, something like: {{{ def urlpatterns(): from django.urls import path from django.contrib import admin return ( path(""admin/"", admin.site.urls), ) ROOT_URLCONF = SimpleLazyObject(urlpatterns) }}} which will happily pass through the checks framework, and runserver (and gunicorn), and let you use Django as you otherwise would... except for navigating to `django.contrib.admindocs.views.ViewIndexView` (for example, routed at `/admin/doc/views/`) where you'll instead encounter an exception like: {{{ File ""/path/to/python3.7/site-packages/django/contrib/admindocs/views.py"" in dispatch 46. return super().dispatch(request, *args, **kwargs) File ""/path/to/python3.7/site-packages/django/views/generic/base.py"" in dispatch 97. return handler(request, *args, **kwargs) File ""/path/to/python3.7/site-packages/django/views/generic/base.py"" in get 158. context = self.get_context_data(**kwargs) File ""/path/to/python3.7/site-packages/django/contrib/admindocs/views.py"" in get_context_data 139. urlconf = import_module(settings.ROOT_URLCONF) File ""/path/to/python3.7/importlib/__init__.py"" in import_module 118. if name.startswith('.'): File ""/path/to/python3.7/site-packages/django/utils/functional.py"" in inner 257. return func(self._wrapped, *args) Exception Type: AttributeError at /admin/doc/views/ Exception Value: 'tuple' object has no attribute 'startswith' }}}",Cleanup/optimization,closed,contrib.admindocs,dev,Normal,fixed,,,Ready for checkin,1,0,0,0,0,0