Possible Duplicate:
How can I pass data to any template from any view in Django?
I wonder if there's a way to make every view send a variable or include it in the request context to every template automatically? Something like the messages framework?
My problem is that I want a sidebar on every page rendered with information, say the 10 latest profile pages the user has entered. The only other alternative that I can think of is calling get_recent_users
at the end of every view and send it to the template as variable, but I don't like that solution because I've got a lot of views. The rendering of it can be easily managed by the base template I use for template inheritance.
Edit: I forgot to mention that the data that I want to access is stored in request.session, if that makes it easier.