summaryrefslogtreecommitdiff
path: root/settings.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-22 23:16:13 -0500
committerDan McGee <dan@archlinux.org>2010-09-22 23:16:13 -0500
commit47c95a2821d1fb926446d2379d4b2273af5482dc (patch)
treebb55f48b4078c7a0097f5db231e12883addf9ec4 /settings.py
parent66d6d33c9b421b14036166e5db311b6d4f0e906c (diff)
Get secure/unsecure checking actually working
We need a bit more, like actually having something relevant in the RequestContext object, in order for this to all work. Instead of putting the full request in just populate a 'secure' key with a boolean value indicating whether the request is secure. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'settings.py')
-rw-r--r--settings.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/settings.py b/settings.py
index 3a7db393..ea87c2cd 100644
--- a/settings.py
+++ b/settings.py
@@ -52,6 +52,16 @@ TEMPLATE_LOADERS = (
'django.template.loaders.app_directories.load_template_source',
)
+# We add a processor to determine if the request is secure or not
+TEMPLATE_CONTEXT_PROCESSORS = (
+ 'django.contrib.auth.context_processors.auth',
+ 'django.core.context_processors.debug',
+ 'django.core.context_processors.i18n',
+ 'django.core.context_processors.media',
+ 'django.contrib.messages.context_processors.messages',
+ 'main.context_processors.secure',
+)
+
# This bug is a real bummer:
# http://code.djangoproject.com/ticket/14105
MIDDLEWARE_CLASSES = (