comparison - compare template variables

Comparison tags

Tags supported by django-template-utils

native_tags.contrib.comparison.greater(x, y)
True if x is greater than y This is a comparison tag.
native_tags.contrib.comparison.greater_or_equal(x, y)
True if x is greater than or equal to y This is a comparison tag.
native_tags.contrib.comparison.less(x, y)
True if x is less than y This is a comparison tag.
native_tags.contrib.comparison.less_or_equal(x, y)
True if x is less than or equal to y This is a comparison tag.

New comparison tags

native_tags.contrib.comparison.startswith(x, y)
String comparison. True if x startswith y This is a comparison tag.
native_tags.contrib.comparison.endswith(x, y)
String comparison. True if x endswith y This is a comparison tag.
native_tags.contrib.comparison.contains(x, y)
String comparison. True if x contains y anywhere This is a comparison tag.
native_tags.contrib.comparison.setting(x)
True if setting x is defined in your settings This is a comparison tag.
native_tags.contrib.comparison.divisible_by(x, y)
Numeric comparison. True if x is divisible by y This is a comparison tag.
native_tags.contrib.comparison.superset(x, y)
Set comparison. True if x is a superset of y This is a comparison tag.
native_tags.contrib.comparison.subset(x, y)
Set comparison. True if x is a subset of y This is a comparison tag.

Table Of Contents

Previous topic

context - context manipulation tags

Next topic

hash - MD5 and SHA tags

This Page