Update contexts and processors for django 1.4
authorMagnus Hagander <magnus@hagander.net>
Sat, 25 May 2013 18:16:38 +0000 (14:16 -0400)
committerMagnus Hagander <magnus@hagander.net>
Sun, 16 Jun 2013 14:35:21 +0000 (16:35 +0200)
Some requirements from the admin interface are also mandatory now,
so include those.

pgweb/settings.py

index 101fc336699930cf586bf8374be0f8d6e6a971e4..95ebfc6ff3bb7bdb5e892028ff70b8d6c77aa354 100644 (file)
@@ -52,14 +52,15 @@ SECRET_KEY = 'REALLYCHANGETHISINSETTINGS_LOCAL.PY'
 
 # List of callables that know how to import templates from various sources.
 TEMPLATE_LOADERS = (
-    'django.template.loaders.filesystem.load_template_source',
-    'django.template.loaders.app_directories.load_template_source',
+       'django.template.loaders.filesystem.Loader',
+    'django.template.loaders.app_directories.Loader',
 #     'django.template.loaders.eggs.load_template_source',
 )
 
 MIDDLEWARE_CLASSES = [
     'django.middleware.common.CommonMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
+       'django.contrib.messages.middleware.MessageMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'util.middleware.PgMiddleware',
@@ -75,7 +76,8 @@ TEMPLATE_DIRS = (
 )
 
 TEMPLATE_CONTEXT_PROCESSORS = (
-       'django.core.context_processors.auth',
+       'django.contrib.auth.context_processors.auth',
+       'django.contrib.messages.context_processors.messages',
        'django.core.context_processors.media',
        'util.contexts.RootLinkContextProcessor',
 )
@@ -91,6 +93,7 @@ AUTHENTICATION_BACKENDS = (
 INSTALLED_APPS = [
     'django.contrib.auth',
     'django.contrib.contenttypes',
+    'django.contrib.messages',
     'django.contrib.sessions',
     'django.contrib.admin',
     'django.contrib.markup',