summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-02-12 00:22:22 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-02-12 00:22:22 +0000
commita0c354ee4ed02bb3f958dfb029d29b76e6637952 (patch)
treeb91d1196ab7675efca2a3201258d1c9644f722e0 /docs
parentd123588184dfecc286e8e06e16dc0383f435c051 (diff)
Fixed #3351 -- Added optional naming of the block in "endblock" tags to ensure
correct nesting. Thanks for the patch, SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4489 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/templates.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/templates.txt b/docs/templates.txt
index a3d60c5400..9b3825f9f7 100644
--- a/docs/templates.txt
+++ b/docs/templates.txt
@@ -253,6 +253,11 @@ Here are some tips for working with inheritance:
if you want to add to the contents of a parent block instead of
completely overriding it.
+ * You can optionally name your ``{{ endblock }}`` tag with the same name
+ you gave the ``{{ block }}`` tag (for example, ``{{ endblock content }}``).
+ In larger templates this helps you see which ``{{ block }}`` tags are
+ being closed.
+
Finally, note that you can't define multiple ``{% block %}`` tags with the same
name in the same template. This limitation exists because a block tag works in
"both" directions. That is, a block tag doesn't just provide a hole to fill --