From 06910aaf8a1edbd3332c855d805b7939cfafc0e4 Mon Sep 17 00:00:00 2001 From: ichuang Date: Sun, 27 May 2012 20:12:47 -0400 Subject: [PATCH] urls: do admin autodiscover if settings.DEBUG --- urls.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/urls.py b/urls.py index 5154a1ffc0..92ee88e69a 100644 --- a/urls.py +++ b/urls.py @@ -6,8 +6,9 @@ from django.conf.urls.static import static import django.contrib.auth.views # Uncomment the next two lines to enable the admin: -# from django.contrib import admin -# admin.autodiscover() +if settings.DEBUG: + from django.contrib import admin + admin.autodiscover() urlpatterns = ('', url(r'^$', 'student.views.index'), # Main marketing page, or redirect to courseware