Switch to new way of specifying admin urls
authorMagnus Hagander <magnus@hagander.net>
Sat, 5 Nov 2011 15:05:37 +0000 (16:05 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sat, 5 Nov 2011 15:05:37 +0000 (16:05 +0100)
Should work for deployed version as well, and the old way stopped
working in 1.3, I believe.

pgweb/urls.py

index 5141012a6222406cec8ee7aa056ad3f5f65e17bd..631224e3376e802b9824f9729e3129bfd96a7e5a 100644 (file)
@@ -113,7 +113,7 @@ urlpatterns = patterns('',
        (r'^admin/mergeorg/$', 'pgweb.core.views.admin_mergeorg'),
 
     # Uncomment the next line to enable the admin:
-    (r'^admin/(.*)', admin.site.root),
+    (r'^admin/', include(admin.site.urls)),
 
     # This should not happen in production - serve by the webserver natively!
     url(r'^media/(.*)$', 'django.views.static.serve', {