On 7/10/06, mamcxyz <[EMAIL PROTECTED]> wrote: > > The login method in django\django\contrib\auth__init__.py > > say: > > def login(request, user): > """ > Persist a user id and a backend in the request. This way a user > doesn't > have to reauthenticate on every request. > """ > if user is None: > user = request.user > # TODO: It would be nice to support different login methods, like > signed cookies. > request.session[SESSION_KEY] = user.id > request.session[BACKEND_SESSION_KEY] = user.backend > > > However user.backend not exist in the user model definition.
What exactly is the problem? Are you getting a traceback? The authenticate method annotates the user object with the 'backend' attribute. It's a string path to the auth backend class IIRC. This is so the auth system knows which backend to get the user from on later requests. Joseph --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---