4.15. Templatetags

4.15.1. Filters

  • lower

  • upper

  • title

  • date

  • default

  • timezone

  • custom filters

{% load tz %}

{{ value|timezone:"Europe/Paris" }}
{% load tz %}

{{ value|utc }}
{% load tz %}

{{ value|localtime }}

4.15.2. Simple Tags

  • trans

  • custom tags

4.15.3. Assignment tags

4.15.4. Block tags

  • custom block tags

{% load tz %}

{% localtime on %}
    {{ value }}
{% endlocaltime %}

{% localtime off %}
    {{ value }}
{% endlocaltime %}
{% load tz %}

{% timezone "Europe/Paris" %}
    Paris time: {{ value }}
{% endtimezone %}

{% timezone None %}
    Server time: {{ value }}
{% endtimezone %}