diff options
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 |