diff options
Diffstat (limited to 'lib/view_wrapper.py')
-rw-r--r-- | lib/view_wrapper.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/view_wrapper.py b/lib/view_wrapper.py new file mode 100644 index 0000000..0e1e492 --- /dev/null +++ b/lib/view_wrapper.py @@ -0,0 +1,10 @@ +from django.shortcuts import render_to_response +from django.template.context import RequestContext + +def luxagraf_render(request, *args, **kwargs): + """ + Replacement for render_to_response that uses RequestContext and sets an + extra template variable, TEMPLATE_NAME. + """ + kwargs['context_instance'] = RequestContext(request) + return render_to_response(*args, **kwargs)
\ No newline at end of file |