8.1.5.1.1. cobbler.web.templatetags package
8.1.5.1.1.1. Submodules
8.1.5.1.1.2. cobbler.web.templatetags.site module
- class cobbler.web.templatetags.site.GreaterOrEqual(var1, var2=None, negate=False)[source]
Bases:
BaseCalc
- class cobbler.web.templatetags.site.IfParser(tokens)[source]
Bases:
object- error_class
alias of
ValueError
- property tokens
- class cobbler.web.templatetags.site.SmartIfNode(var, nodelist_true, nodelist_false=None)[source]
Bases:
Node
- class cobbler.web.templatetags.site.SmartIfTests(methodName='runTest')[source]
Bases:
TestCase- assertCalc(calc, context=None)[source]
Test a calculation is True, also checking the inverse “negate” case.
- class cobbler.web.templatetags.site.TemplateIfParser(parser, *args, **kwargs)[source]
Bases:
IfParser- error_class
alias of
TemplateSyntaxError
- class cobbler.web.templatetags.site.TestVar(value)[source]
Bases:
objectA basic self-resolvable object similar to a Django template variable. Used to assist with tests.
- cobbler.web.templatetags.site.ifinlist(parser, token)
A smarter {% if %} tag for django templates.
While retaining current Django functionality, it also handles equality, greater than and less than operators. Some common case examples:
{% if articles|length >= 5 %}...{% endif %} {% if "ifnotequal tag" != "beautiful" %}...{% endif %}
Arguments and operators _must_ have a space between them, so
{% if 1>2 %}is not a valid smart if tag.All supported operators are:
or,and,in,=(or==),!=,>,>=,<and<=.
- cobbler.web.templatetags.site.register = <django.template.library.Library object>
A smarter {% if %} tag for django templates.
While retaining current Django functionality, it also handles equality, greater than and less than operators. Some common case examples:
{% if articles|length >= 5 %}...{% endif %} {% if "ifnotequal tag" != "beautiful" %}...{% endif %}
- cobbler.web.templatetags.site.smart_if(parser, token)[source]
A smarter {% if %} tag for django templates.
While retaining current Django functionality, it also handles equality, greater than and less than operators. Some common case examples:
{% if articles|length >= 5 %}...{% endif %} {% if "ifnotequal tag" != "beautiful" %}...{% endif %}
Arguments and operators _must_ have a space between them, so
{% if 1>2 %}is not a valid smart if tag.All supported operators are:
or,and,in,=(or==),!=,>,>=,<and<=.