default

  • Module: mod_base

Provide an alternative value in case a value has a falsy value (0, false, undefined or empty string).

For example:

{{ value|default:1 }}

See also

filter-if, filter-is_defined, filter-is_undefined, filter-if_undefined