On 8/29/06, Gary Wilson <[EMAIL PROTECTED]> wrote: > So I hit another little snag today related to this. The > contrib.auth.middleware.LazyUser calls contrib.auth.get_user (knowing > where to get the user from based on the backend stored in > session['_auth_user_backend']), which will return an > authentication-backend-dependent user object. This user object > shouldn't have to conform to contrib.auth.models.User's interface, yet > core.context_processors.auth calls > request.user.get_and_delete_messages(). This means that whatever user > object I return with my backend must implement a > get_and_delete_messages method. > > Another problem with the request.user.get_and_delete_messages() call is > that request.user is a LazyUser. So LazyUser is doing us no good since > this call will always put LazyUser to work.
Thanks for bringing this up, Gary. The get_and_delete_messages() thing has always bothered me -- if it's activated, we do it for every request. I suppose we could make the 'messages' part of the context processor lazy, so that it would only call get_and_delete_messages() if that variable were accessed in the template... Thoughts? Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---