I have recently had the same problem, but I solved it adding
null=True
to the DateTimeField.
Good luck!
Aidas Bendoraitis aka Archatas
On 10/30/06, Merric Mercer <merric hiveonline.co.uk> wrote:
>
> I'm am having a problem with the DateTimeField when I
save the data
> through the related class.
>
> Example
>
> class Transaction:
> user =
>
ForeignKey(UserProfile,edit_inline=models.TABULAR,num_extra_
on_change=0)
> DateTimeField(auto_now_add=True, blank=True)
>
> When I add data to Transaction, through the Admin,
everything seems
> fine. I can view the the individual transactions
without a problem.
>
> I can see the transaction when I first go to a related
UserProfile.
> However, as soon as I save the UserProfile I get the
following error
> "Value Error - Year out of Range".
>
> Looking at the database it is clear that when I do a
save through the
> UserProfile, the DateTimeField is being changed for
related transaction
> field. I had understood from the documentation that
auto_now_add only
> changed the datefield when the object was first
created. Can anybody
> explain where I'm going wrong.
>
> MerMer
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|