Wow. That almost sounds like a bug, though you can however use a callable.
As ridiculous as it looks, it should work :).
INF_TIME = datetime.max.replace(tzinfo=timezone.utc)
def get_inf_time():
return INF_TIME
death = models.DateTimeField(default=get_inf_time)
What you are doing seems pretty rare, though it seems maybe that error
message should not be recommending a naive datetime.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/857b1a2c-0c37-4899-8db9-2e211d3d2ab0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.