In a Django template, is there a way to get a value from a key that has a space in it? Eg, if I have a dict like:
{\"Restaurant Name\": Foo}
You can use a custom filter as well.
from django import template register = template.Library() @register.filter def get(mapping, key): return mapping.get(key, '')
and within the template
{{ entry|get:"Restaurant Name" }}