bittersweet.templatetags.bittersweet_context_utils module

Utilities for manipulating the current template context

bittersweet.templatetags.bittersweet_context_utils.get_key(dictlike, key)[source]

Filter to return a dictionary value by name

Returns None if the key does not exist so either check or use |default_if_none

Usage:

{{ my_dict|get_key:"the key I want" }}