What do you mean by "not accepted"? Is there some error message? What you wrote should work as far as I know.
from datetime import date pub_date = models.DateField(default=date.today) On Monday, August 22, 2016 at 7:04:11 PM UTC-4, Rich Shepard wrote: > > Reading the doc for DateField() I tried to set the default as today's > date, but 'default=date.today' is not accepted. > > If there is a way to set today's data as the default for a DateField() > please point me to the doc for it. > > Thanks, > > Rich > -- 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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/cf5f9c4e-91e2-4926-93aa-22667a2846f9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

