Hi all,

In my Django app I've got a few entries in TEMPLATE_CONTEXT_PROCESSORS
that let me set a few context variables that are common to every page.
I do this as some of my pages are generic views, some are custom views,
and some are just plain flatpages. It's the easiest way for me to set
variables used in the base template on every page.

I've also got a session variable named 'region' that I'd like to be
able to access from my base template on every page. My assumption is
I'll set it via a the context processors, but that's where my trouble
lies. I can't seem to get access to the request object (and hence, the
session object) prior to the template being built and returned.

Is there any way I can do this? If not, is there anyway I can access
the session from within a templatetag? If so I'll just create a
templatetag that sets 'region' in the context of the template.

Cheers,

Ross


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to