and with this method created_at and updated_at both arguments will trigger the field update event with timezon.now(), is there any other method to enter only created_at at time of inserting
On Wednesday, 28 November 2018 12:43:03 UTC+5:30, Ankit Khandewal wrote: > > hello, i am using this code to update created_at and updated_at in models: > created_at = models.DateTimeField(auto_now_add=True) > updated_at= models.DateTimeField(auto_now=True,null=True) > > but however there is created _at is greater than updated_at when data is > inserted: > > created_at -> 2018-11-26 11:11:30.020989 > updated_at -> 2018-11-26 11:11:30.019762 > > please help, thank you. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7f97cc2d-45b4-488b-a709-d9c2fb313d08%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

