Akismet thinks my ticket is spam -- please add me to the whitelist so
that I can submit the following ticket and patch:

Problem:

The date_joined and last_login fields in the contrib.auth package are
both declared as "default=models.LazyDate()", which results in the
following incorrect behavior:

 1. date_joined and last_login are updated to the current date/time
whenever the User model is saved.
 2. last_login is updated when the user logs into the admin interface,
but any application front-ends hooking on to contrib.auth will have to
update it themselves upon authenticating.  This is not what the name
"last_login" implies, imo.

Patch description:

(patched against r4077)

The attached patch defines date_joined and last_login as
auto_now_add=True, so they are timestamped only upon creation of the
user object.  Subsequently, upon successful authentication, last_login
is updated with the current time.

Patch can be found here:
http://www.progprog.com/files/contrib_auth_date_fields_errors.patch


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
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