]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
urls: Don't "include" admin URLs
authorStephen Finucane <stephen@that.guru>
Thu, 18 May 2017 20:17:40 +0000 (21:17 +0100)
committerStephen Finucane <stephen@that.guru>
Thu, 18 May 2017 20:17:40 +0000 (21:17 +0100)
This raises a warning in Django 1.9 and will cause an error in Django
2.0. Per the documentation [1] it is not even necessary so it can simply
be removed.

This resolves all issues with Django 1.9.

[1] https://docs.djangoproject.com/en/1.11/ref/contrib/admin/\
      #hooking-adminsite-instances-into-your-urlconf

Signed-off-by: Stephen Finucane <stephen@that.guru>
patchwork/urls.py

index f700f38633122e4a553aec03da635fba8d15d0c1..1871c9a9d99a28c89d1378a48e4f4a9f89a1e68f 100644 (file)
@@ -40,7 +40,7 @@ from patchwork.views import xmlrpc as xmlrpc_views
 admin.autodiscover()
 
 urlpatterns = [
-    url(r'^admin/', include(admin.site.urls)),
+    url(r'^admin/', admin.site.urls),
 
     url(r'^$', project_views.project_list, name='project-list'),
     url(r'^project/(?P<project_id>[^/]+)/list/$', patch_views.patch_list,