diff --git a/horizon/templatetags/branding.py b/horizon/templatetags/branding.py index cff2119432..a43432ccfe 100644 --- a/horizon/templatetags/branding.py +++ b/horizon/templatetags/branding.py @@ -52,7 +52,7 @@ def site_branding_link(): # TODO(jeffjapan): This is just an assignment tag version of the above, replace # when the dashboard is upgraded to a django version that -# supports the @assignment_tag decorator syntax instead. +# supports the @simple_tag decorator syntax instead. class SaveBrandingNode(template.Node): def __init__(self, var_name): self.var_name = var_name diff --git a/horizon/templatetags/horizon.py b/horizon/templatetags/horizon.py index 5e22734263..3661bf09b7 100644 --- a/horizon/templatetags/horizon.py +++ b/horizon/templatetags/horizon.py @@ -199,19 +199,19 @@ def jstemplate(parser, token): return JSTemplateNode(nodelist) -@register.assignment_tag +@register.simple_tag def load_config(): return conf -@register.assignment_tag +@register.simple_tag def datepicker_locale(): locale_mapping = getattr(settings, 'DATEPICKER_LOCALES', bootstrap_datepicker.LOCALE_MAPPING) return locale_mapping.get(translation.get_language(), 'en') -@register.assignment_tag +@register.simple_tag def template_cache_age(): return getattr(settings, 'NG_TEMPLATE_CACHE_AGE', 0) diff --git a/openstack_dashboard/templatetags/context_selection.py b/openstack_dashboard/templatetags/context_selection.py index 3f5b5c3c62..8b7718f83f 100644 --- a/openstack_dashboard/templatetags/context_selection.py +++ b/openstack_dashboard/templatetags/context_selection.py @@ -34,14 +34,14 @@ def is_multidomain_supported(): False)) -@register.assignment_tag(takes_context=True) +@register.simple_tag(takes_context=True) def is_multi_region(context): if 'request' not in context: return False return is_multi_region_configured(context['request']) -@register.assignment_tag +@register.simple_tag def is_multidomain(): return is_multidomain_supported() diff --git a/openstack_dashboard/templatetags/themes.py b/openstack_dashboard/templatetags/themes.py index c76b71ea04..c2d779a41c 100644 --- a/openstack_dashboard/templatetags/themes.py +++ b/openstack_dashboard/templatetags/themes.py @@ -67,22 +67,22 @@ def find_asset(theme, asset): return staticfiles_storage.url(pathname2url(return_path)) -@register.assignment_tag() +@register.simple_tag() def themes(): return hz_themes.get_selectable_themes() -@register.assignment_tag() +@register.simple_tag() def theme_cookie(): return hz_themes.get_theme_cookie_name() -@register.assignment_tag() +@register.simple_tag() def theme_dir(): return hz_themes.get_theme_dir() -@register.assignment_tag(takes_context=True) +@register.simple_tag(takes_context=True) def current_theme(context): return get_theme(context.request)