Auto-updated timestamp fields in Django bulk querysets.
Feb. 6, 2020In Django, fields with auto_now=True are not always updated correctly. A common practice to work around this is to override the save() method on the model, or to use a pre-save hook. However, this doesn't work when calling Model.objects.update() since save() is not called on all instances in the queryset. A common way to fix this would be to alter the table, for example, in MySQL it may look li...