Guest User

Untitled

a guest
Jul 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. from django.shortcuts import render_to_response
  2. from django.template import RequestContext
  3.  
  4.  
  5. def render(request, *args, **kwargs):
  6. """
  7. Adds RequestContext to the render_to_response shortcut
  8.  
  9. Usage:
  10. response = render(request, template_name, context)
  11. """
  12. kwargs['context_instance'] = RequestContext(request)
  13. return render_to_response(*args, **kwargs)
Add Comment
Please, Sign In to add comment