Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use named 'endblock' tags #94

Open
macro1 opened this issue Mar 15, 2014 · 1 comment
Open

Use named 'endblock' tags #94

macro1 opened this issue Mar 15, 2014 · 1 comment

Comments

@macro1
Copy link
Member

macro1 commented Mar 15, 2014

Example:

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

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

@macro1
Copy link
Member Author

macro1 commented Nov 4, 2014

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."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant