#6646: included template blocks are not being overrided by parent template.
-----------------------+----------------------------------------------------
Reporter:  anonymous   |       Owner:  nobody                 
  Status:  new         |   Component:  Template system        
 Version:  SVN         |    Keywords:  include, extends, block
   Stage:  Unreviewed  |   Has_patch:  0                      
-----------------------+----------------------------------------------------
 When including a template into a parent template, the child-template's
 blocks are not overridden by the parent.

 For example:

 base.html
 {% if is_satchmo %}
 {% include "satchmo_base.html" %}
 {% else %}
 {% include "journal_base.html" %}
 {% endif %}

 journal_base.html contains the following block:
 {% block content%}{% endblock %}

 view_template.html extends base.html (with the context variable is_satchmo
 == False).  view_template.html contains {% block content%}{% endblock %}
 which should filled with data from the view's context variable.

 If I rename journal_base.html to base.html - everything works fine - but
 when I use the version of base.html that relies on the include tag, {%
 block content %} doesn't get overridden.

 The documentation says that context vairables are available to included
 templates, so not being able to override blocks seems like a bug.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/6646>
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