From 9f975ac055023a8f483b2dfeae36f75c04e50f5f Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Tue, 19 Oct 2010 10:55:21 +0200 Subject: [PATCH] settings: Enable the admin interface. --- settings.py | 5 ++++- urls.py | 9 ++++----- 2 files changed, 8 insertions(+), 6 deletions(-) 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'), ) -- 2.30.2