How, then, can i extend multiple code sources off of my index.html
file?

I'm looking at the Django Template language page (http://
www.djangoproject.com/documentation/templates/) and what it's saying
(as well as my logic) isn't meshing with what you're saying. Here's a
simple example I'm creating right now for educational purposes:

index_title.html:

{% extends "index.html" %}
{% block tag_title %}THIS IS THE TITLE{% endblock %}

index.html:

<html>
<head>
<title>{% block block_title %}THIS IS NOT THE TITLE{% endblock %}</
title>
</head>
<body>
{% block block_header %}THIS IS NOT THE HEADER{% endblock %}<br />
<br />
{% block block_body %}THIS IS NOT THE BODY{% endblock %}<br />
<br />
{% block block_footer %}THIS IS NOT THE FOOTER{% endblock %}<br />
<br />
</body>
</html>

I'm going to load the "index_title.html" file? How can I load the
proper files to extend the header, body and footer section then? It
just seems like reverse logic to me.

On Oct 22, 11:54 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On 10/22/07, DjangoFett <[EMAIL PROTECTED]> wrote:
>
>
>
> > def Index( request ):
>
> >   t = loader.get_template( 'index.html' )
>
> I think you want:
>
> t = loader.get_template( 'index_title.html' )
>
> there.  Your view code needs to specify the "extending" template you want to
> have rendered, not the base template being extended.
>
> Karen


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to