What you are describing are Django "Context Processors". http://docs.djangoproject.com/en/dev/ref/templates/api/?from=olddocs#id1
Basically you'd make a new context processor to set the variables you need in your context and have it included for all of your views. You can do this on an application-specific level thusly: http://www.pointy-stick.com/blog/2008/02/12/django-tip-application-level-context-processors/ (there are a few typos in that article, I can reply with corrections if need be but I don't have them readily available) -Chris On Tue, Mar 10, 2009 at 11:18 PM, Joshua K <[email protected]> wrote: > > Hello, > > Is there a way to filter all requests before URLS.py dispatches the > request? > > I am developing a Pinax application. I have some custom menu tabs > across the top, and I limit the visibility of those tabs depending on > flags present in the user's account. I do this by enabling custom > fields in the rendered context; the template contains a series of 'if' > statements to enable the correct tabs. > > On my custom tabs, the URLS of which dispatch to my custom views, > everything works because I set the proper variables in the context. > However, for other Pinax-basic stuff, those routines do not contain > code to set the variables in the context - so the tabs never show. > > How might I go about writing code that handles ALL requests, adding > the required variables, and then dispatches to URLS.py? > > Cheers, > -Josh > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

