Russ his solution is better indeed, but the content of the middle
block has to be defined in the child template, so it would become the
following:

----
a.html
{% block decorated %}first {% block content %}{% endblock %} last{%
endblock %}

b.html
{% extends a.html %}
{% block decorated %}left {{ block.super }} right{% endblock %}

template.html
{% extends (either "base.a.html" or "base_b.html") %}
{% block content %}middle{% endblock %}
----


Off topic:
The {% decorate %} template tag has its uses, but is indeed not
required here.
It is a design pattern that's commonly used in languages like
XAML.net.
It is more readable and compact than the only current alternative:
including a template and using {% extends %} inside the include.

cheers,
Jonathan

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers?hl=en.

Reply via email to