It is recommended not using auto_now or auto_now_add and instead of these you can define your own save() method to make sure that it is only updated if the id is not set such as when the item is first created), and have it update modified every time the item is saved.
You can follow the below-mentioned code:-
from django.utils import timezone
class User(models.Model):
created = models.DateTimeField(editable=False)
modified = models.DateTimeField()
def save(self, *args, **kwargs):
if not self.id:
self.created = timezone.now()
self.modified = timezone.now()
return super(User, self).save(*args, **kwargs)
I hope this will help you.
To know more about this you can have a look at the following video:-