Template inheritance question: Let's say I have the following
templates,
#1.base.html
<html>
<body>
{%block start%}<h1>{%endblock%}
{%block stuff%}hey hey{%endblock%}
{%block stop%}</h1>{%endblock%}
</body>
</html>

#2. index.html
{%extends "base"%}
{%block stuff%}ho ho{%endblock%}

#3. different.html
{%extends "index"%}
{%block start%}<h2>{%endblock%}
{%block stop%}</h2>{%endblock%}

I would expect different.html to render like this:
<html>
<body>
<h2>ho ho</h2>
</body>
</html>

But it doesn't, ie. you cannot overwrite block tags from you parent's
parent unless your parent specifies them too so you get this:
<html>
<body>
<h1>ho ho</h1>
</body>
</html>

Just wondering whether there is a solution other than sticking {%block
...%]{{block.super}}{%endblock%} all over the place in index.html or
splitting things up even more with {%include/ssi%}


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to