changeset 72:06b69000a057

settings.py: Fix Django compatibility issue with TEMPLATE_CONTEXT_PROCESSORS Instead of defining all the TEMPLATE_CONTEXT_PROCESSORS in settings.py, the setting was changed to use Django's default context processors and add on any additional context processors needed for this project. The alternative leads to incompatibility issues when the default context processors are renamed (as the auth context processor was, for Django 1.2). This fix is not likely to cause any issues. For more information: https://docs.djangoproject.com/en/1.2/ref/settings/#template-context-processors http://blog.madpython.com/2010/04/07/django-context-processors-best-practice/
author dellsystem <ilostwaldo@gmail.com>
date Tue, 07 Aug 2012 00:34:46 -0400
parents f181ee227dc6
children e24fec1bfe31
files settings.py
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/settings.py
+++ b/settings.py
@@ -3,6 +3,8 @@
 
 import sys
 
+import django.conf.global_settings as DEFAULT_SETTINGS
+
 # Read some settings from config file
 from ConfigParser import ConfigParser
 config = ConfigParser()
@@ -119,14 +121,9 @@
 
 ACCOUNT_ACTIVATION_DAYS = 1
 
-TEMPLATE_CONTEXT_PROCESSORS = (
-    "django.core.context_processors.auth",
-    "django.core.context_processors.debug",
-    "django.core.context_processors.i18n",
-    "django.core.context_processors.media",
-    "django.core.context_processors.request",
-)
-
+TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS + (
+                             'django.core.context_processors.request',
+                              )
 
 INSTALLED_APPS = (
     'django.contrib.auth',