Re: [Django] #17524: self referential blocks

2012-01-11 Thread Django
#17524: self referential blocks
--+--
 Reporter:  pasquinelli@… |Owner:  nobody
 Type:  New feature   |   Status:  closed
Component:  Template system   |  Version:  1.3
 Severity:  Normal|   Resolution:  wontfix
 Keywords:  recursive blocks  | Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by lukeplant):

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


Comment:

 You can do this by calling the inner block something different e.g.
 contentinner. Any templates that inherit from refined.html will know which
 template they are inheriting from, therefore can know to override
 'contentinner' and not 'content'.

 Having nested blocks with the same name is confusing - it's really not
 obvious which one you want to override. Therefore closing WONTFIX, since I
 can't see a use case for this that can't be achieved by less confusing
 means.

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #17524: self referential blocks

2012-01-10 Thread Django
#17524: self referential blocks
--+--
 Reporter:  pasquinelli@… |Owner:  nobody
 Type:  New feature   |   Status:  reopened
Component:  Template system   |  Version:  1.3
 Severity:  Normal|   Resolution:
 Keywords:  recursive blocks  | Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by pasquinelli@…):

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


Comment:

 Replying to [comment:1 russellm]:
 > Duplicate of #4529, and others. I think you might be looking for the {%
 include %} tag.

 wouldn't using the {% include %} tag require that the template know about
 the template that extends it, either by hard coding the name or through a
 context variable? isn't the purpose of blocks to allow the template to be
 extended to not have to know about the template doing the extending?

 #4529 is about using a block as a variable, to repeat content. this is
 about a base template defining ''some'' of the contents of a block from
 the base template it extends, and then allowing the rest of the content to
 be supplied by subtemplates that refer to the same block. just to clarify,
 i'm not suggesting that multiple occurrences of a block should be legal,
 just nested occurrences of a block.

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #17524: self referential blocks

2012-01-09 Thread Django
#17524: self referential blocks
--+--
 Reporter:  pasquinelli@… |Owner:  nobody
 Type:  New feature   |   Status:  closed
Component:  Template system   |  Version:  1.3
 Severity:  Normal|   Resolution:  duplicate
 Keywords:  recursive blocks  | Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by russellm):

 * status:  new => closed
 * needs_better_patch:   => 0
 * resolution:   => duplicate
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 Duplicate of #4529, and others. I think you might be looking for the {%
 include %} tag.

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #17524: self referential blocks

2012-01-09 Thread Django
#17524: self referential blocks
-+--
 Reporter:  pasquinelli@…|  Owner:  nobody
 Type:  New feature  | Status:  new
Component:  Template system  |Version:  1.3
 Severity:  Normal   |   Keywords:  recursive blocks
 Triage Stage:  Unreviewed   |  Has patch:  0
Easy pickings:  0|  UI/UX:  0
-+--
 say i have a '''{% block content %}''' in '''base.html''' and i'd like to
 refine it in another template '''refined.html''', while still exposing the
 block to other templates that extend from '''refined.html''' like so:


 {{{
 {% block content %}

   {% block content %}{% endblock content %}

 {% endblock content %}
 }}}


 currently this is impossible because there can be only one occurrence of a
 block in a template, which means i have to repeat myself. i think you
 should be able to override a block and still expose it for further
 extension.

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.