Since I need my logged in user to be available to each
template, I
need to go and add context_instance=RequestContext(request)
to each
view. Is there any setting which can make RequestContext
available to
each view?
A related question is, I have some objects I need to make
available to
each page, for example to show in the sidebar. So I need to
call a
method for each of my view to do add these objects, like
...
payload = {'create_form': create,}
payload.update(_get_sidebar_objects(request))
return render_to_response('create.html', payload,
context_instance=RequestContext(request),)
Is there some way I can make some objects avaibale to all
templates?
--~--~---------~--~----~------------~-------~--~----~
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 htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|