What’s the best way to set a creation date for an object automatically, and also a field that will record when the object was last updated?
created_at = models.DateTimeField(False, True, editable=False)
updated_at = models.DateTimeField(True, True, editable=False)
if request.method == ‘POST’:
form = MyForm(request.POST)