Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
def render(request, template_name, args=None, kwargs=None):
context = dict([ (var, locals()[var]) for var in args ]) if args else {}
context.update(kwargs) if kwargs else pass
return render_to_response(template_name,context,RequestContext(request))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment