Commits

Anonymous committed ce5d7ab

Redirect to admin now depends on settings.ADMIN_SITE

  • Participants
  • Parent commits 93c4583

Comments (0)

Files changed (1)

 
 admin.autodiscover()
 
-
 default_patterns = patterns('',
     (r'^admin/doc/', include('django.contrib.admindocs.urls')),
     (r'^admin/', include(admin.site.urls)),
     (r'^databrowse/(.*)', databrowse.site.root),
 )
 
-default_patterns += patterns('django.views.generic.simple',
-    ('^$', 'redirect_to', {'url': '/admin/'}),
-)
+if getattr(settings, 'ADMIN_SITE', False):
+    default_patterns += patterns('django.views.generic.simple',
+        ('^$', 'redirect_to', {'url': '/admin/'}),
+    )
 
 if settings.SERVE_MEDIA:
     default_patterns += patterns('',