diff gpp/settings.py @ 178:d51743322bb2

#56 - Cut over to Django 1.2 messaging system.
author Brian Neal <bgneal@gmail.com>
date Wed, 17 Mar 2010 03:12:05 +0000
parents 776028f4bced
children aef00df91165
line wrap: on
line diff
--- a/gpp/settings.py	Mon Mar 15 03:26:38 2010 +0000
+++ b/gpp/settings.py	Wed Mar 17 03:12:05 2010 +0000
@@ -62,12 +62,14 @@
 TEMPLATE_LOADERS = (
     ('django.template.loaders.cached.Loader', (
         'django.template.loaders.filesystem.Loader',
+        'django.template.loaders.app_directories.Loader',
     )),
 )
 
 MIDDLEWARE_CLASSES = (
     'django.middleware.common.CommonMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
+    'django.contrib.messages.middleware.MessageMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
     'gpp.forums.middleware.WhosOnline',
@@ -84,10 +86,11 @@
 )
 
 TEMPLATE_CONTEXT_PROCESSORS = (
-   "django.contrib.auth.context_processors.auth",
-   "django.core.context_processors.debug",
-   "django.core.context_processors.request",
-   "django.core.context_processors.media"
+    "django.contrib.auth.context_processors.auth",
+    "django.core.context_processors.debug",
+    "django.core.context_processors.request",
+    "django.core.context_processors.media",
+    "django.contrib.messages.context_processors.messages",
 )
 
 INSTALLED_APPS = (
@@ -95,11 +98,12 @@
     'django.contrib.admindocs',
     'django.contrib.auth',
     'django.contrib.contenttypes',
+    'django.contrib.flatpages',
     'django.contrib.humanize',
+    'django.contrib.markup',
+    'django.contrib.messages',
     'django.contrib.sessions',
     'django.contrib.sites',
-    'django.contrib.markup',
-    'django.contrib.flatpages',
     'elsewhere',
     'tagging',
     'accounts',
@@ -132,6 +136,11 @@
 DEFAULT_FROM_EMAIL = ADMINS[0][1]
 
 #######################################################################
+# Messages
+#######################################################################
+MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'
+
+#######################################################################
 # Caching
 #######################################################################
 if local_settings.USE_CACHE: