If you are doing what I think you are doing, you should not use a dictionary. The parameters you pass to the template are already in the dictionary. If you are not going to iterate over them, you better put the keys directly in the template parameters.
return render_to_response(t.html, context_instance=RequestContext(request, {'aa':1, 'ab': 1, 'ac':1}))
And now itβs very easy to refer to them in your template.
{{ aa }} {{ ab }} {{ ac }}
If you really need to iterate over an arbitrary dictionary, then AndiDog's answer is correct.
source share