Create a template tag like this (in yourproject/templatetags):
@register.filter
def keyvalue(dict, key):
return dict[key]
Usage:
{{dictionary|keyvalue:key_variable}}
Create a template tag like this (in yourproject/templatetags):
@register.filter
def keyvalue(dict, key):
return dict[key]
Usage:
{{dictionary|keyvalue:key_variable}}