Hi all,

I was looking at middleware - so, thanks Todd for the pointer in the
right direction. I can't seem to find anything much in docs or on the
web about TEMPLATE_CONTEXT_PROCESSORS in Django. Anyone got any links?

Cheers,
Dave

On Apr 10, 11:47 pm, "Todd O'Bryan" <[EMAIL PROTECTED]> wrote:
> On Tue, 2007-04-10 at 22:21 +0000, Dave wrote:
> > I could add to the Context object in each view, but that's a lot of
> > repeat code (urgh). Also, if I were to take that route, I'd need the
> > Model to be available between multiple apps within a project and I've
> > not seen how to do that.
>
> You want a TEMPLATE_CONTEXT_PROCESSOR. Write a function that takes a
> request and returns a dictionary with the name you want for your
> included model. Then add that function to TEMPLATE_CONTEXT_PROCESSORS in
> your settings.py file. Voila.
>
> Todd


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to