diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-10-17 14:26:20 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-10-17 14:26:20 +0000 |
| commit | 63a3c72e19758995c7933be0644b33ff6a5d9837 (patch) | |
| tree | c55f7398412f7184877f6bf1f64290b75989e6d8 /docs | |
| parent | 383704ac844323375e743b555f6a64d6daf6d14d (diff) | |
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
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/templates.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/templates.txt b/docs/templates.txt index 843ed0cbaa..215b663634 100644 --- a/docs/templates.txt +++ b/docs/templates.txt @@ -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 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 ============================ |
