Hi,

I am just getting started in Django, and am running into a question
about the best Django way to go about setting up sidebar type blocks.
For my site I would like to have a few sidebar items that are
dynamically driven from the database.  I am confused as to how this
fits into the views and templates.

I first thought I would setup a view for the sidebar block, and then
include it's template with the {% include %} in the base.html
template.  However, I soon realized that this just includes the
template code, but doesn't get the values fed to it by the view, since
you are not including the view, just the template html.

Then I thought I could setup the base.html as a view, but I think I
would run into the same issue.

Next thought was for each view, add the extra data needed for the
sidebar block, and override the base.html block for that area, but
this doesn't seem very practical, and doesn't feel like the Django way
of less code.

So in summary, I am looking for advice on how this sort of issue
should be approached in Django.

Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to