On Tue, Jul 07, 2009 at 03:06:39AM -0700, Darren wrote: > > Hi guys, > > Chasing my tail a bit here, hoping you can help me. > > say I have a base.html: > > ------------- > <html> > {% include 'header.html' %} > </html> > -------------- > > header.html: > --------------------- > <title>{% block title %}Default title{% endblock title %}</title> > --------------------- > > And a child detail.html > --------------- > {% extends 'base.html %} > {% block title %}Different title{% endblock title %} > --------------- > > When rendering detail.html, should the title block in header.html be > overridden? I'm guessing my understanding of how the template > including/inheritance understanding is wrong, so please correct me :) >
I think your understanding is correct. :) It will get overriden. The result will be <title>Different title</title> It's just as if you wrote base.html like this: <html> <title>{% block title %}Default title{% endblock title %}</title> </html> -- You can learn many things from children. How much patience you have, for instance. -- Franklin P. Jones --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---