The horizon.templatetags.horizon
ModuleΒΆ
-
class
horizon.templatetags.horizon.
JSTemplateNode
(nodelist)[source] Bases:
django.template.base.Node
Helper node for the
jstemplate
template tag.-
render
(context)[source]
-
-
class
horizon.templatetags.horizon.
MinifiedNode
(nodelist)[source] Bases:
django.template.base.Node
-
render
(context)[source]
-
-
horizon.templatetags.horizon.
datepicker_locale
()[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_nav
(context)[source]
-
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.
minifyspace
(parser, token)[source] Removes whitespace including tab and newline characters. Do not use this if you are using a <pre> tag Example usage:
{% minifyspace %} <p> <a title="foo" href="foo/"> Foo </a> </p> {% endminifyspace %}
- This example would return this HTML::
- <p><a title=”foo” href=”foo/”>Foo</a></p>
-
horizon.templatetags.horizon.
quota
(val, units=None)[source]
-
horizon.templatetags.horizon.
quotainf
(val, units=None)[source]
-
horizon.templatetags.horizon.
quotapercent
(used, limit)[source]