Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 63a3c72e19758995c7933be0644b33ff6a5d9837 1 parent 383704a
Adrian Holovaty authored October 17, 2005

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. 7  docs/templates.txt
7  docs/templates.txt
@@ -224,6 +224,13 @@ Here are some tips for working with inheritance:
224 224
       if you want to add to the contents of a parent block instead of
225 225
       completely overriding it.
226 226
+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.
227 234
 Using the built-in reference
228 235
229 236

0 notes on commit 63a3c72

Please sign in to comment.
Something went wrong with that request. Please try again.