django.contrib.auth.login doesn't just take any user, it needs one that's been modified by authenticate
|Reported by:||Owned by:||David A Krauth|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Looking at http://www.djangoproject.com/documentation/authentication/, you'd think you could just pass in a request and a User. But you can't. The code for login needs the side effect caused by calling authenticate, which is to add the backend to the user object.
This is very frustrating when writing code where you'd like to log a user in automatically. At the very least, the documentation needs to be changed to reflect it.
Change History (7)
comment:3 Changed 9 years ago by
|Owner:||changed from nobody to David A Krauth|
|Status:||new → assigned|