On 15/11/06, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On 11/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > 2 date fields ("last_login","date_joined") are supposed to be added
> > automatically. But on
> > add such SQL error is being generated:
>
> The fields aren't "added automatically" if you're doing it that way;
> there is a convenience method on the manager for the User class which
> will automatically fill them in, though; the method is
> 'User.objects.create_user', and it expects a username, email address
> and password, in that order (it will hash the password automatically).
> It will create and save a User object and return that User object so
> you can further manipulate it. See the code here:
>
> http://code.djangoproject.com/browser/django/trunk/django/contrib/auth/models.py#L70
>
James,

scroll down a little further on that page and you'll see that the User
model has:

            last_login = models.DateTimeField(_('last login'),
default=models.LazyDate())
            date_joined = models.DateTimeField(_('date joined'),
default=models.LazyDate())

So Alex *is* seeing broken behaviour here as it relates to
http://code.djangoproject.com/ticket/2993 where use of LazyDate was
broken in changeset 3960.


Alex, there is a patch attached to that ticket that reverts that
checkin until the django devs get around to reverting/fixing it
themselves.

regards

matthew

> --
> "May the forces of evil become confused on the way to your house."
>   -- George Carlin
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to