[cse491] HW9 Templates

C. Titus Brown ctb at msu.edu
Mon Nov 9 17:19:43 PST 2009


On Mon, Nov 09, 2009 at 08:14:35PM -0500, Andrew Kos wrote:
> In the HW your example template contains the following:
> 
> > {% block content %}
> > hello, world
> > {% endblock %}
> >
> > How would you render this with base.html without using the extends tag?
> Also, why would you want to render this without an extends tag? Since you
> might have different layouts for different pages and may not want the code
> to assume that every page should be based on base.html, why wouldn't each
> template file contain an extends tag from which it is derived?

You are correct & that template fragment should contain an extends tag.

--titus
-- 
C. Titus Brown, ctb at msu.edu



More information about the cse491-fall-2009 mailing list