In django - is there a default timestamp field for all objects? That is, do I have to explicitly declare a \'timestamp\' field for \'created on\' in my Model - or is there a way
If you want to be able to modify this field, set the following instead of auto_now_add=True:
auto_now_add=True:
For Date
from datetime import date models.DateField(default=date.today)
For DateTime
from django.utils import timezone models.DateTimeField(default=timezone.now)