d_tomorrow is expected that ORM Django has a date attribute (apparently), but does not.
Anyway, you probably want to use the date called for the default date; otherwise, each model date will default to tomorrow relative to the time the model class was initialized, rather than the time the model was created. You can try the following:
import datetime def tomorrow(): return datetime.date.today() + datetime.timedelta(days=1) class Model(models.Model): timeout = models.DateTimeField(null=True, blank=True, default=tomorrow)
mipadi
source share