From: Matthijs Kooijman Date: Tue, 19 Oct 2010 08:55:21 +0000 (+0200) Subject: settings: Enable the admin interface. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=9f975ac055023a8f483b2dfeae36f75c04e50f5f;p=matthijs%2Fprojects%2Fdorestad-bookings.git settings: Enable the admin interface. --- diff --git a/settings.py b/settings.py index c6bd83d..91b6996 100644 --- a/settings.py +++ b/settings.py @@ -47,7 +47,7 @@ MEDIA_URL = '' # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a # trailing slash. # Examples: "http://foo.com/media/", "/media/". -ADMIN_MEDIA_PREFIX = '/media/' +ADMIN_MEDIA_PREFIX = '/admin/media/' # Make this unique, and don't share it with anybody. SECRET_KEY = 'dd1=%ckg%xhi((eq)^@ri0o62trw-j!3(4bed9#u5)$_h&a!)0' @@ -80,6 +80,9 @@ LOGIN_REDIRECT_URL = "/reserveren/" INSTALLED_APPS = ( 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.admin', 'tickets', ) diff --git a/urls.py b/urls.py index 3770765..e3a1d5c 100644 --- a/urls.py +++ b/urls.py @@ -1,8 +1,7 @@ from django.conf.urls.defaults import * -# Uncomment the next two lines to enable the admin: -# from django.contrib import admin -# admin.autodiscover() +from django.contrib import admin +admin.autodiscover() urlpatterns = patterns('', (r'^reserveren/$', 'dorestad-bookings.tickets.views.book'), @@ -13,8 +12,8 @@ urlpatterns = patterns('', # to INSTALLED_APPS to enable admin documentation: # (r'^admin/doc/', include('django.contrib.admindocs.urls')), - # Uncomment the next line to enable the admin: - # (r'^admin/(.*)', admin.site.root), + # Enable the auto admin interface + (r'^admin/(.*)', admin.site.root), url(r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'tickets/login.html'}, name='login'), url(r'^logout/$', 'django.contrib.auth.views.logout_then_login', name='logout'), )