1
0
mirror of https://github.com/django/django.git synced 2024-12-24 18:16:19 +00:00

Added note about multiple block tags to docs/templates.txt

git-svn-id: http://code.djangoproject.com/svn/django/trunk@905 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-10-17 14:26:20 +00:00
parent 383704ac84
commit 63a3c72e19

View File

@ -224,6 +224,13 @@ Here are some tips for working with inheritance:
if you want to add to the contents of a parent block instead of if you want to add to the contents of a parent block instead of
completely overriding it. completely overriding it.
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 --
it also defines the content that fills the hole in the *parent*. If there were
two similarly-named ``{% block %}`` tags in a template, that template's parent
wouldn't know which one of the blocks' content to use.
Using the built-in reference Using the built-in reference
============================ ============================