Tags¶
#
¶
<dj-#>...</dj-#>
{# ... #}
autoescape-off
¶
<dj-autoescape-off>
...
</dj-autoescape-off>
{% autoescape off %}
{% endautoescape %}
autoescape-on
¶
<dj-autoescape-on>
...
</dj-autoescape-on>
{% autoescape on %}
{% endautoescape %}
block
¶
Note
The end tag can optionally have a name attribute. If it is missing, the endblock
will use the name attribute from the start tag.
<dj-block name='content'>
...
</dj-block>
{% block content %}
...
{% endblock content %}
csrf
, csrf-token
, csrf-input
¶
<dj-csrf />
{% csrf_token %}
comment
¶
<dj-comment>
...
</dj-comment>
{% comment %}
...
{% endcomment %}
css
¶
<dj-css href='css/styles.css' />
<link href="{% static 'css/styles.css' %}" rel="stylesheet" />
debug
¶
<dj-debug />
{% debug %}
extends
¶
<dj-extends parent='base' />
<dj-extends parent='base.html' />
{% extends 'base.html' %}
filter
¶
<dj-filter ... />
{% filter ... %}
lorem
¶
<dj-lorem />
{% lorem %}
image
¶
<dj-image src='img/django.jpg' />
<img src="{% static 'img/django.jpg' %}" />
now
¶
<dj-now />
{% now %}
spaceless
¶
<dj-spaceless>
...
</dj-spaceless>
{% spaceless %}
...
{% endspaceless %}
templatetag
¶
<dj-templatetag ... />
{% templatetag ... %}
verbatim
¶
<dj-verbatim>
...
</dj-verbatim>
{% verbatim %}
...
{% endverbatim %}