# Tags The `dj-angles` approach is shown first and then the equivalent Django Template Language is second. ## [`#`](https://docs.djangoproject.com/en/stable/ref/templates/language/#comments) ``` ... ``` ```html {# ... #} ``` ## [`autoescape-off`](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#autoescape) ```html ... ``` ```html {% autoescape off %} {% endautoescape %} ``` ## [`autoescape-on`](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#autoescape) ```html ... ``` ```html {% autoescape on %} {% endautoescape %} ``` ## [`block`](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#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. ``` ``` ... ``` ```{note} The tag can be self-closing if there is not default block content. ``` ``` ``` ```html {% block content %} ... {% endblock content %} ``` ## [`call`](template-tags/call.md) ``` ``` ```html {% call slugify("Hello Goodbye") as variable_name %} ``` ## [`csrf`](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#csrf-token), [`csrf-token`](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#csrf-token), [`csrf-input`](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#csrf-token) ```html ``` ```html {% csrf_token %} ``` ## [`comment`](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#comment) ```html ... ``` ```html {% comment %} ... {% endcomment %} ``` ## `css` ``` ``` ```html ``` ## [`debug`](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#debug) ```html ``` ```html {% debug %} ``` ## [`extends`](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#extends) ``` ``` ```html {% extends 'base.html' %} ``` ## [`filter`](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#filter) ``` ``` ```html {% filter ... %} ``` ## [`form`](custom-elements/ajax-form.md) ### ajax Whether or not the form should be submitted via AJAX. Uses the [`ajax-form` custom element](custom-elements/ajax-form.md). ``` ... ``` ```html
...
``` #### swap Defines how the form should be replaced after submission. Valid values are `outerHTML` and `innerHTML`. ``` ... ``` ```html
...
``` ### csrf Whether or not the form should include a CSRF token. ``` ... ``` ```html
{% csrf_token %} ...
``` ## [`lorem`](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#lorem) ```html ``` ```html {% lorem %} ``` ## `image` ``` ``` ```html ``` ## [`model`](template-tags/model.md) ``` ``` ```html {% model Book.objects.filter(id=1) as book %} ``` ## [`now`](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#now) ```html ``` ```html {% now %} ``` ## [`spaceless`](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#spaceless) ```html ... ``` ```html {% spaceless %} ... {% endspaceless %} ``` ## [`templatetag`](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#templatetag) ``` ``` ```html {% templatetag ... %} ``` ## [`verbatim`](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#verbatim) ```html ... ``` ```html {% verbatim %} ... {% endverbatim %} ```