From 25b695e53dd09415f7849b35cd7bc63ca0b2439b Mon Sep 17 00:00:00 2001 From: substantialnoninfringinguser Date: Wed, 13 May 2009 05:52:59 +0100 Subject: [svn] Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8245 by aaron @ 2/17/2009 1:09 AM --- alwaysUseRequestContext.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 alwaysUseRequestContext.py (limited to 'alwaysUseRequestContext.py') 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 -- cgit v1.2.3