djblets.util.compat.django.template.context
Compatibility functions for working with template contexts.
-
flatten_context
(context)[source]
Flatten a template context into a dictionary.
Django 1.7 introduced Context.flatten
, which converts a template context into
a dictionary. However, this doesn’t exist on Django 1.6. This compatibility
function ensures equivalent functionality on both.