intranet.apps.templatetags package

Submodules

intranet.apps.templatetags.dates module

intranet.apps.templatetags.dates.fuzzy_date(date)[source]

Formats a datetime.datetime object relative to the current time.

intranet.apps.templatetags.dates.fuzzy_time(time)[source]

Formats a datetime.time object relative to the current time.

intranet.apps.templatetags.dates.time_to_date(time)[source]

Returns a datetime.datetime object from a datetime.time object using the current date.

intranet.apps.templatetags.dictionaries module

intranet.apps.templatetags.dictionaries.lookup(d, key)[source]

intranet.apps.templatetags.form_field module

intranet.apps.templatetags.form_field.field_(self, name)[source]

From https://github.com/halfnibble/django-underscore-filters

Get a form field starting with _. Taken near directly from Django > forms. Returns a BoundField with the given name.

intranet.apps.templatetags.forms module

intranet.apps.templatetags.forms.field_array_index(field)[source]
intranet.apps.templatetags.forms.field_array_size(field)[source]
intranet.apps.templatetags.forms.is_array_field(field)[source]

intranet.apps.templatetags.math module

intranet.apps.templatetags.math.divide(dividend, divisor)[source]

Returns the quotient of the arguments as a float.

intranet.apps.templatetags.math.maximum(num1, num2)[source]

Returns smaller of two numbers.

intranet.apps.templatetags.math.minimum(num1, num2)[source]

Returns smaller of two numbers.

intranet.apps.templatetags.math.multiply(num1, num2)[source]

Returns the product of the arguments.

intranet.apps.templatetags.math.round_num(number, precision=0)[source]

Rounds a number to a given precision in decimal digits (default 0 digits) and returns the integer value.

Precision may be negative. A precision of 1 will round to the tenths place and a precision of -1 will round to the tens place.

Returns: Float

intranet.apps.templatetags.math.to_int(num)[source]

Converts a number to an integer.

intranet.apps.templatetags.paginate module

intranet.apps.templatetags.paginate.page_list(paginator, current_page) List[Optional[int]][source]

Pagination

If there is a None in the output, it should be replaced with …’s.

intranet.apps.templatetags.paginate.query_transform(request, **kwargs)[source]

intranet.apps.templatetags.strings module

intranet.apps.templatetags.strings.contains_digit(s)[source]
intranet.apps.templatetags.strings.endswith(val, arg)[source]

intranet.apps.templatetags.tests module

class intranet.apps.templatetags.tests.TemplateTest(methodName='runTest')[source]

Bases: IonTestCase

Tests for the templates.

test_validate_templates()[source]

Validates all the templates.

Module contents