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
section of the website would be easier. In the end, I want to merge all
those different sections into one file and load that in my view. Can you
please help me with this ?

Artem,
Yes, I get it :) Thanks!


On Sat, May 18, 2013 at 9:56 PM, Artem Zinoviev <arzinov...@gmail.com>wrote:

> 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 - you get it :-), but {% block sidebar %} section be blank...
>
> суббота, 18 мая 2013 г., 12:14:37 UTC+3 пользователь Parin Porecha написал:
>
>> 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
>>
>> say Kifflom! <http://www.epsilonprogram.com/> and look forward to
>> 17.09.13 !
>>
>  --
> 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+unsubscr...@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.
>
>
>



-- 
Regards,
Parin Porecha

say Kifflom! <http://www.epsilonprogram.com/> and look forward to 17.09.13 !

-- 
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+unsubscr...@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.


Reply via email to