sandiegopython / test-driven-django-development

This repository contains materials for a San Diego Python workshop on learning Django with test inspired development
http://test-driven-django-development.readthedocs.org/
Other
102 stars 35 forks source link

Use named 'endblock' tags #94

Open macro1 opened 10 years ago

macro1 commented 10 years ago

Example:

{% block "content" %}
<p>my content</p>
{% endblock "content" %}

I can't seem to find the docs on this.

macro1 commented 10 years ago

Anyone doing this, correct syntax is without the quotes:

{% block content %}
<p>my content</p>
{% endblock content %}

There is a brief mention of this in the docks: https://docs.djangoproject.com/en/dev/topics/templates/#template-inheritance Scroll to "For extra readability, you can optionally give a name to your {% endblock %} tag."