summaryrefslogtreecommitdiffstats
path: root/main/context_processors.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-23 06:16:13 +0200
committerDan McGee <dan@archlinux.org>2010-09-23 06:16:13 +0200
commit47c95a2821d1fb926446d2379d4b2273af5482dc (patch)
treebb55f48b4078c7a0097f5db231e12883addf9ec4 /main/context_processors.py
parent66d6d33c9b421b14036166e5db311b6d4f0e906c (diff)
downloadarchweb-47c95a2821d1fb926446d2379d4b2273af5482dc.tar.gz
archweb-47c95a2821d1fb926446d2379d4b2273af5482dc.tar.xz
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 'main/context_processors.py')
-rw-r--r--main/context_processors.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/context_processors.py b/main/context_processors.py
new file mode 100644
index 0000000..a60d4e6
--- /dev/null
+++ b/main/context_processors.py
@@ -0,0 +1,4 @@
+def secure(request):
+ return {'secure': request.is_secure()}
+
+# vim: set ts=4 sw=4 et: