[Answer]-In Django, how do I avoid/skip/undo a pre-save event?

1👍

In the end, I just did an end-around:

from django.db import connection
cursor = connection.cursor()
cursor.execute("update %s set modified='%s' where id=%s" % (
    my_model._meta.db_table, desired_modified_date, my_model.id))

0👍

You cannot. Not in the sense you’re asking.

What you can is create a fake field and populate it on clean().

Class MyModel(models.Model):

    def clean(self):
        self._modified = self.modified

...

@receiver(pre_save, sender=MyModel)
def receiver_(self, *args, **kwargs):
    self.modified = self._modified

So you’re backing up the field value and putting it back later. notes: ensure your application is loaded later.

Leave a comment