[damned-lies] Use django's default TEMPLATE_CONTEXT_PROCESSORS



commit 9bc502c55b2999f6b792ab4a73a420486416ff5b
Author: Gil Forcada <gforcada gnome org>
Date:   Sat Oct 27 17:45:43 2012 +0200

    Use django's default TEMPLATE_CONTEXT_PROCESSORS
    
    It was overrided and thus lacking any default that it could be
    potentially be added on django itself.
    
    Also added the request template context processor to be able to
    use the request on templates itself.

 settings.py |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/settings.py b/settings.py
index fa7b6e6..4a16373 100644
--- a/settings.py
+++ b/settings.py
@@ -1,8 +1,8 @@
 # -*- coding: utf-8 -*-
 # Django settings for djamnedlies project.
-
 import os
 from django.conf import global_settings
+from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS as TCP
 gettext_noop = lambda s: s
 
 DEBUG = True
@@ -101,15 +101,8 @@ TEMPLATE_LOADERS = (
     'django.template.loaders.app_directories.Loader',
 )
 
-TEMPLATE_CONTEXT_PROCESSORS = (
-    # Default:
-    "django.contrib.auth.context_processors.auth",
-    "django.core.context_processors.debug",
-    "django.core.context_processors.i18n",
-    "django.core.context_processors.media",
-    "django.core.context_processors.static",
-    "django.contrib.messages.context_processors.messages",
-    # Custom:
+TEMPLATE_CONTEXT_PROCESSORS = TCP + (
+    "django.core.context_processors.request",
     "common.context_processors.utils",
 )
 
@@ -175,4 +168,3 @@ if USE_DJANGO_OPENID:
     OPENID_CREATE_USERS = False
     OPENID_UPDATE_DETAILS_FROM_SREG = True
     OPENID_UPDATE_DETAILS_FROM_AX = True
-



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]