#4529: Allow multiple blocks with the same name in one template
---------------------------------------------------------+------------------
          Reporter:  Noam Raphael <[EMAIL PROTECTED]>  |         Owner:  nobody
            Status:  reopened                            |     Milestone:       
 
         Component:  Template system                     |       Version:  SVN  
 
        Resolution:                                      |      Keywords:       
 
             Stage:  Design decision needed              |     Has_patch:  1    
 
        Needs_docs:  0                                   |   Needs_tests:  0    
 
Needs_better_patch:  0                                   |  
---------------------------------------------------------+------------------
Changes (by [EMAIL PROTECTED]):

  * status:  closed => reopened
  * resolution:  wontfix =>

Comment:

 I stumbled upon this, while trying to make a first page. The explanation
 in docs says:

 ''
 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.
 ''

 If that's the reasoning behind, then the error should only appear, when
 the template is used as a leaf of inheritance. And even then it would be
 much more intuitive, to just use the defined content. The user would get
 that something is wrong, if he got the content twice. Anyway the patch
 would also do the work for me. And there are at least two threads found on
 google for that problem.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4529#comment:6>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to