diff options
author | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-05-13 05:52:59 +0100 |
---|---|---|
committer | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-05-13 05:52:59 +0100 |
commit | 25b695e53dd09415f7849b35cd7bc63ca0b2439b (patch) | |
tree | f229dd9604ff082ce2a45eb5d4e6616366766b2f /alwaysUseRequestContext.py | |
parent | d25fd97864611c3be326412ae4aa84e8ad01cd66 (diff) | |
download | troggle-25b695e53dd09415f7849b35cd7bc63ca0b2439b.tar.gz troggle-25b695e53dd09415f7849b35cd7bc63ca0b2439b.tar.bz2 troggle-25b695e53dd09415f7849b35cd7bc63ca0b2439b.zip |
[svn]
Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8245 by aaron @ 2/17/2009 1:09 AM
Diffstat (limited to 'alwaysUseRequestContext.py')
-rw-r--r-- | alwaysUseRequestContext.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/alwaysUseRequestContext.py b/alwaysUseRequestContext.py new file mode 100644 index 0000000..b587b52 --- /dev/null +++ b/alwaysUseRequestContext.py @@ -0,0 +1,8 @@ +# this is the snippet from http://www.djangosnippets.org/snippets/3/
+
+from django.shortcuts import render_to_response
+from django.template import RequestContext
+
+def render_response(req, *args, **kwargs):
+ kwargs['context_instance'] = RequestContext(req)
+ return render_to_response(*args, **kwargs)
\ No newline at end of file |