Template Inheritance doubt
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 {% block sidebar %}
and 'topbar.html' which extends {% block topbar %}
The 'sidebar.html' is also divided into further blocks which are extended by other templates.
Now, my question is -
in 'views.py', i have a view which is supposed to render the whole homepage ( i.e.- including the sidebar, topbar and content ). So, which template should I load in the view, so that both sidebar and topbar plus the content defined in other templates gets shown ?
because 'base.html' contains many children, I'm confused which one to load
Thanks to mattmc who tried to help me with this in IRC. Sorry, didn't get it completely :)
--
Regards,
Parin Porecha
Parin Porecha
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home