I would like it to appear as if it was a default value for the object,
to be honest. :) And by that I mean I would like to be able to display
the default-value of date_created on the create page (and the actual
date_created of the object on an edit page.)
Doing it in save() doesn't help. Doing it
What's the proper way to create a field which is set to the date the
object was created via a web view?
I tried doing this in the model:
def Today():
return datetime.date.today()
date_created = models.DateField(default=Today)
Which works when presenting the "create" page to the user, but
2 matches
Mail list logo