The horizon.templatetags.horizon ModuleΒΆ

class horizon.templatetags.horizon.JSTemplateNode(nodelist)[source]

Bases: django.template.base.Node

Helper node for the jstemplate template tag.

JSTemplateNode.render(context)[source]
horizon.templatetags.horizon.has_permissions(user, component)[source]

Checks if the given user meets the permissions requirements for the component.

horizon.templatetags.horizon.has_permissions_on_list(components, user)[source]
horizon.templatetags.horizon.horizon_dashboard_nav(context)[source]

Generates sub-navigation entries for the current dashboard.

horizon.templatetags.horizon.horizon_main_nav(context)[source]

Generates top-level dashboard navigation entries.

horizon.templatetags.horizon.horizon_progress_bar(current_val, max_val)[source]

Renders a progress bar based on parameters passed to the tag. The first parameter is the current value and the second is the max value.

Example: {% progress_bar 25 50 %}

This will generate a half-full progress bar.

The rendered progress bar will fill the area of its container. To constrain the rendered size of the bar provide a container with appropriate width and height styles.

horizon.templatetags.horizon.jstemplate(parser, token)[source]

Replaces [[[ and ]]] with {{{ and }}}, [[ and ]] with {{ and }} and [% and %] with {% and %} to avoid conflicts with Django’s template engine when using any of the Mustache-based templating libraries.

horizon.templatetags.horizon.load_config()[source]
horizon.templatetags.horizon.quota(val, units=None)[source]

Previous topic

The horizon.templatetags.parse_date Module

Next topic

The horizon.templatetags.sizeformat Module

This Page