On Tue, Mar 10, 2009 at 10:18 PM, Joshua K <jobe...@gmail.com> 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're probably looking for a template context processor, consult the docs for info on them. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---