Re: Where can I put code that will get executed when page refreshes
Hey,
You must be using a context variable to fill your `side_menu` block.
One reason for failure can be that, context variable is available in
template when `ntw.views.index` is called but not available when
'staff.views.index' is called.
--
Pankaj Singh
http://about.me/psjinx
On Tue, Jan 22, 2013 at 10:04 PM, frocco <farocco@gmail.com> wrote:
> I have a index.html template that extends base.html
> In Index I has:
> {% block side_menu %}
> <h3>Content</h3>
> {% endblock %}
>
> I fill this block from a database table.
> This only works if I click on the home link.
> if I click any other link to view, the side-menu is not populated.
>
> url(r'^$', 'ntw.views.index', name='home'), works
> url(r'^staff/', 'staff.views.index'), does not work
>
> ntw.views.py has the code to query the database
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/tRmjXkGaeoEJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home