Omitting Template Tag

Created on Oct. 19, 2012, 1:04 p.m. by Hevok & updated by Hevok on May 2, 2013, 5:24 p.m.

For omitting the rendering of template tag {{ }} there are two options:

  1. {% templatetage %} for variables:

    {% templatetag openvariable %} variable {% templatetag closevariable %} will render as {{ variable }}

  2. {% verbatim %} for large block of text (only in Django-1.5(dev)):

    {% verbatim %} This {{ content }} won't be processed. {% endverbatim %}


Tags: template
Categories: Tutorial
Parent: Web Framework

Update entry (Admin) | See changes

Comment on This Data Unit