Wednesday, August 10, 2011

Django template tag escaping

In django, template tags look like this for a variable:
{{ variable_name }}
Sometimes you want to print out "{{" or "}}" without django trying to interpret it. Here's an example of how to escape the the template tags:
{% templatetag openvariable %} blah {% templatetag closevariable %}

No comments:

Post a Comment