Created
January 7, 2010 15:47
-
-
Save lprsd/271311 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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