Django

Code

Changeset 905

Show
Ignore:
Timestamp:
10/17/05 09:26:20 (3 years ago)
Author:
adrian
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/templates.txt

    r862 r905  
    224224      if you want to add to the contents of a parent block instead of 
    225225      completely overriding it. 
     226 
     227Finally, note that you can't define multiple ``{% block %}`` tags with the same 
     228name in the same template. This limitation exists because a block tag works in 
     229"both" directions. That is, a block tag doesn't just provide a hole to fill -- 
     230it also defines the content that fills the hole in the *parent*. If there were 
     231two similarly-named ``{% block %}`` tags in a template, that template's parent 
     232wouldn't know which one of the blocks' content to use. 
    226233 
    227234Using the built-in reference