It appears that included templates ({% include 'my/include/
template.html' %}) don't support inheritance.  Is there any plan on
supporting this?

To be more specific say I have 3 templates

my/root.html
{% include 'my/include/template.html' %}

my/include/template.html
{% extends 'my/include/parent.html' %}
{% block include_title %}
  Inclue Title
{% endblock %}
{% block include_content %}
  Inclue Content
{% endblock %}

my/include/parent.html
<div class="some_nifty_styling">
  {% block include_title %}
  {% endblock %}
  {% block include_content %}
  {% endblock %}
</div>

Rendering of root.html will omit the 'some_nifty_styling' div as jinja
seems to ignore the extends directive within the include.  Also, if I
were to call {{ super() }} in either block inside of template.html,
jinja would throw an error: 'no super block for 'include_title'

I had thought about converting this layout to use macros, but
unfortunately, macros support at most one body, and in most of my
cases I need 2 or more, and inheritance is the better fit.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" 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/pocoo-libs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to