LazyUser is lazy and works fine. It's only triggered because of the
messages part of the processor so that's the root of the problem
(which is currently being talked about in another thread)

On Oct 29, 4:51 am, bo <[EMAIL PROTECTED]> wrote:
> well, not exactly.
>
> the "LazyUser" is the thing that is not so lazy (yes i agree that the
> messages are not lazy either), the Session is hit on the get_user
> statement in auth() before the messages are even considered (see the
> back trace).
>
> The idea i am proposing is to make that entire
> context_processors.auth() function a lazy entity so it only hits any
> session/DB/messages/etc,etc when 'called' from inside a template or
> view.
>
> bo
>
> On Oct 27, 6:58 pm, SmileyChris <[EMAIL PROTECTED]> wrote:
>
> > This is exactly why my patch in the session messages ticket [1] makes
> > the messages lazy.
>
> > [1]http://code.djangoproject.com/ticket/4604
>
> > On Oct 28, 1:59 pm, bo <[EMAIL PROTECTED]> wrote:
>
> > > Actually i've found that the issue lies with the
> > > TEMPLATE_CONTEXT_PROCESSORS
>
> > > django.core.context_processors.auth
>
> > > which does the get_and_delete messages bit ..
>
> > > so i guess that is the proper behavior.
>
> > > Sad to say that although my app can work around that issue (by using a
> > > different messages mechanism thus i do not need
> > > django.core.context_processors.auth) but "contrib.admin" screams if it
> > > is not included.
>
> > > So either this may be a documentation issue to say that "using
> > > django.core.context_processors.auth will always insert a Vary: Cookie
> > > header" or fix up admin to use the "request.user" instead of "user"
> > > directly in the Context and then require
> > > "django.core.context_processors.request" to always be included ...
>
> > > bo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to