On Fri, Oct 2, 2009 at 6:40 PM, Matt <[email protected]> wrote:
>
> Also, I meant if view a parent template, it looks for child templates
> around it that extend it. I think my question above is the other way
> around
>
>
I don't know what you are trying to ask. You don't view templates in a
browser. Rather, your code renders a template with a given context, and the
result is sent back to a browser. If you specify a parent template on the
call to render, that is the template that gets rendered. Nothing is going
to search and try to find child templates that extend the template you have
specified to render and render the child instead.
If you specify a child template (one that beings with {% extends %}) on the
call to render, then, because of the {% extends %}, the parent template is
located and rendered. But the parent is specifically named in the child
that was specified for rendering (or in its parent, which may also be a
template that starts with {% extends %}, etc.). There is no general search
done in this case either -- the templates involved are either specifically
named in the call to render, or in a rendered template's {% extends %}
block.
Karen
> On Oct 2, 6:33 pm, Matt <[email protected]> wrote:
> > then do you view the child template in a browser, and it looks for the
> > parent template, then outputs the all the code?
> >
> > On Oct 2, 1:42 pm, Karen Tracey <[email protected]> wrote:
> >
> > > On Fri, Oct 2, 2009 at 7:00 AM, Matt <[email protected]> wrote:
> >
> > > > Does Django have a "radar", like it searches for child templates that
> > > > extends the parent template?
> >
> > > No.
> >
> > > Karen
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---