Skip to content

Instantly share code, notes, and snippets.

@emperorcezar
Created June 23, 2011 19:54
Show Gist options
  • Save emperorcezar/1043476 to your computer and use it in GitHub Desktop.
Save emperorcezar/1043476 to your computer and use it in GitHub Desktop.
Pass the request every time
from django.shortcuts import render_to_response as render
from django.template import RequestContext
from django.conf import settings
def render_to_response(*args, **kwargs):
kwargs['context_instance'] = RequestContext(args[1]['request'])
return render(*args, **kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment