Yes, this approach is also good. Besides, I have no problem in letting the
html tags remain in header and footer.
Thanks :)
On Tue, May 21, 2013 at 3:58 AM, Sam Solomon wrote:
> If you are mainly using this for splitting stuff into multiple files, here
> is what we do to accomplish the same thi
If you are mainly using this for splitting stuff into multiple files, here
is what we do to accomplish the same thing but keep it so that templates
always inherit base.html instead of sidebar.html:
base.html:
{% extends 'header.html' %}
{% block main %}
{% endblock main %}
header.html:
{%
Dow,
I am using the chained approach which you suggested ( base -> topbar ->
sidebar -> view1 ). It works perfectly as i wanted :)
Thanks!
On Sun, May 19, 2013 at 10:50 PM, Dow Street wrote:
> Hi. I'm not sure, but we may be using the terms 'parent' and 'child'
> differently (i.e. what you're
Hi. I'm not sure, but we may be using the terms 'parent' and 'child'
differently (i.e. what you're calling a child I'm calling a parent?). I have
only used django template inheritance where a given template file has at most
one {% extends %} tag in it - that is what I am referring to when I sa
Dow,
I am trying to have multiple children of the same parent. And thats why I'm
not able to decide which child to load. Anyways, the sidebar and topbar are
more or less static, so I guess there isn't much need to have separate
files for them. I want to have them different so that developing that
s
if you have base.html and sidebar.html, base.html file just declare {%
block sidebar %} section and sidebar.html make implementation of it, if you
have SidebarView, then you load sidebar.html and this file take all from {%
extends base.html %}. And if you try load base.html from SidebarView - yo
It sounds like you are trying to have a template inherit code from multiple
parents. One option is to stay with a simple inheritance hierarchy where each
child template extends at most one parent template. If you want to use
different code for different sub-sections of your project then just a
Hi,
I have just started to learn Django's template inheritance and I am stuck
due to this problem -
In my application's 'base.html', I have defined two blocks -
{% block topbar %}{% endblock topbar %}
and
{% block sidebar %}{% endblock sidebar %}
I have 2 templates - 'sidebar.html' which extends
8 matches
Mail list logo