Skip to content

Instantly share code, notes, and snippets.

@lprsd
Created January 7, 2010 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lprsd/271315 to your computer and use it in GitHub Desktop.
Save lprsd/271315 to your computer and use it in GitHub Desktop.
from django.shortcuts import render_to_response
from django.template.context import RequestContext
def eb_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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment