#2706: request object availability
----------------------------+-----------------------------------------------
Reporter: Joeboy | Owner: adrian
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Core framework | Version:
Severity: normal | Keywords: context rendercontext templatetags
templatetag
----------------------------+-----------------------------------------------
Ok, I've banged on about this a bit on the lists and not had much response
so I'm trying again here.
Suppose I want my django website to differ according to the user that's
logged into it. Eg. I want it to say 'Hello Jane Doe', or only display
certain bits if the user's logged in, or some such very common thing that
relies on the request object. So I put something to that effect in my
base.html, make sure the auth context processor is in effect, and all is
groovy.
*Except* that that information will only be available to the template if
every view in my project uses a RequestContext instead of a vanilla
Context, so, I need to go through my projects and change them all. This
makes a bit of a mockery of the idea of pluggable apps, unless there's
some edict that says all reusable apps should use RequestContext. And that
means lots of miscellaneous data floating about in all contexts.
Am I right in considering this to be a rather significant problem? Do the
devs envisage doing anything about it, (maybe in all that spare time left
over from their day jobs and merging a million SoC branches)? If not, how
should I deal with it? Just use RequestContext everywhere and stop
whingeing?
What I think I would like, btw, is the ability to set up context
processors for individual templatetags. I don't know quite how much that
would involve swimming against the tide of the django code, but it would
seem to address the problem. I recognise that there's a lot going on in
django atm, but it would make me happy to at least get some kind of
response about this, especially as people are talking about setting up
public app repositories on the list at the moment.
Cheers.
--
Ticket URL: <http://code.djangoproject.com/ticket/2706>
Django <http://code.djangoproject.org/>
The web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates
-~----------~----~----~----~------~----~------~--~---