On Aug 1, 9:25 pm, james_027 <[EMAIL PROTECTED]> wrote: > hi, > > ... I just want to understand how > django works for me to learn this framework well.
My guess as to the intent of the design is that caching a database backed object in the session wouldn't be a good idea as it can get out of sync with what's in the database. Not all access to the auth_user record will be through the session cached User object. As to the User being loaded on every request, take a look at this line found in django.contrib.auth.middleware: request.__class__.user = LazyUser() If you take a look at the LazyUser object you will see that the User is only loaded when request.user is accessed. Hope that helps (and is accurate :-). Doug Van Horn www.maydigital.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---