On Sat, Mar 14, 2009 at 11:56 PM, kpeters <[email protected]> wrote:
> default (active field) does not seem to propagate - see below
> (Postgres 8.3.6 - current Django as of yesterday)
>
> Any ideas?
This is expected behavior: the `default` argument can be things that
can't properly be represented in a database. Consider::
def tomorrow():
return datetime.date.today() + datetime.timedelta(days=1)
pub_date = models.DateField(default=tomorrow)
This creates a `DateField` that defaults to "tomorrow"; that can't
easily be represented in a database.
Jacob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---