OpenQuizz
Une application de gestion des contenus pédagogiques
|
Functions | |
def | test_odd (value) |
def | test_even (value) |
def | test_divisibleby (value, num) |
def | test_defined (value) |
def | test_undefined (value) |
def | test_none (value) |
def | test_boolean (value) |
def | test_false (value) |
def | test_true (value) |
def | test_integer (value) |
def | test_float (value) |
def | test_lower (value) |
def | test_upper (value) |
def | test_string (value) |
def | test_mapping (value) |
def | test_number (value) |
def | test_sequence (value) |
def | test_sameas (value, other) |
def | test_iterable (value) |
def | test_escaped (value) |
def | test_in (value, seq) |
Variables | |
number_re | |
regex_type | |
test_callable | |
TESTS | |
def jinja2.tests.test_boolean | ( | value | ) |
Return true if the object is a boolean value. .. versionadded:: 2.11
def jinja2.tests.test_defined | ( | value | ) |
Return true if the variable is defined: .. sourcecode:: jinja {% if variable is defined %} value of variable: {{ variable }} {% else %} variable is not defined {% endif %} See the :func:`default` filter for a simple way to set undefined variables.
def jinja2.tests.test_divisibleby | ( | value, | |
num | |||
) |
Check if a variable is divisible by a number.
def jinja2.tests.test_escaped | ( | value | ) |
Check if the value is escaped.
def jinja2.tests.test_even | ( | value | ) |
Return true if the variable is even.
def jinja2.tests.test_false | ( | value | ) |
Return true if the object is False. .. versionadded:: 2.11
def jinja2.tests.test_float | ( | value | ) |
Return true if the object is a float. .. versionadded:: 2.11
def jinja2.tests.test_in | ( | value, | |
seq | |||
) |
Check if value is in seq. .. versionadded:: 2.10
def jinja2.tests.test_integer | ( | value | ) |
Return true if the object is an integer. .. versionadded:: 2.11
def jinja2.tests.test_iterable | ( | value | ) |
Check if it's possible to iterate over an object.
def jinja2.tests.test_lower | ( | value | ) |
Return true if the variable is lowercased.
def jinja2.tests.test_mapping | ( | value | ) |
Return true if the object is a mapping (dict etc.). .. versionadded:: 2.6
def jinja2.tests.test_none | ( | value | ) |
Return true if the variable is none.
def jinja2.tests.test_number | ( | value | ) |
Return true if the variable is a number.
def jinja2.tests.test_odd | ( | value | ) |
Return true if the variable is odd.
def jinja2.tests.test_sameas | ( | value, | |
other | |||
) |
Check if an object points to the same memory address than another object: .. sourcecode:: jinja {% if foo.attribute is sameas false %} the foo attribute really is the `False` singleton {% endif %}
def jinja2.tests.test_sequence | ( | value | ) |
Return true if the variable is a sequence. Sequences are variables that are iterable.
def jinja2.tests.test_string | ( | value | ) |
Return true if the object is a string.
def jinja2.tests.test_true | ( | value | ) |
Return true if the object is True. .. versionadded:: 2.11
def jinja2.tests.test_undefined | ( | value | ) |
Like :func:`defined` but the other way round.
def jinja2.tests.test_upper | ( | value | ) |
Return true if the variable is uppercased.
number_re |
regex_type |
test_callable |
TESTS |