Stodge wrote: > Say I want to inject a piece of data into every page view. For > now, let's just say I want to inject the current time into > each page view. I write a piece of middleware that will do it. > But how? Do I modify the request? Or the view (process_view)?
I understand that this should be done by modifying the request in your middleware and then making use of it in your templates (if it's to appear on every page, it may (or may not) make sense to put it in your base.html template). This assumes your views are using a RequestContext which pass the request object into the template as part of the rendering context. -tim --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---