Skip to content

Instantly share code, notes, and snippets.

@fxdgear
Created September 11, 2011 14:29
Show Gist options
  • Save fxdgear/1209660 to your computer and use it in GitHub Desktop.
Save fxdgear/1209660 to your computer and use it in GitHub Desktop.
### In view ###
def my_view(request, *args, **kwargs):
#stuff that happens
my_dict = { 'value1': "hi", 'value2': "world" }
return render_to_response(template, {
'my_dict': my_dict,
}, RequestContext(request))
#### In template ####
<div class="something">
{{ my_dict.value1 }}-{{ my_dict.value2 }}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment