I write a blog on wagtail when adding a page
such a mistake pops up 
Closed due to the fact that off-topic participants cheops , 0xdb , Vadizar , Twiss , Artem 9 Apr '18 at 9:30 .
It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:
- “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - cheops, 0xdb, Vadizar, Twiss, Artem
|
1 answer
Try using date = models.DateField(null=True, blank=True) , if you do not need to specify the date of publication. Or
from datetime import date date = models.DateField("Date", default=date.today) to add publication creation date.
Links to related questions: https://stackoverflow.com/questions/11351619/how-to-make-djangos-datetimefield-optional https://stackoverflow.com/questions/2029295/django-datefield-default-options
- Thanks helped from datetime import date date date = models.DateField ("Date", default = date.today) - Denis Novomlinov
|
