fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

@mirekdlugosz I haven't tried this, but I wonder if the `pre_save` signal handler would add items to the `update_fields` parameter. It's passed by reference, so there's a possibility that would work. But it's also super weird and difficult to determine where those updates are happening and something that shouldn't be recommended.

@mirekdlugosz Also, good write up and thank you for sharing!

@CodenameTim

Good thinking. As far as I remember, something turns `update_fields` into tuple before passing it to signal. And since tuples are immutable, there’s nothing you can do from signal handler.

I mean, given the dynamic nature of Python probably there is something you can do, but that would be extremely obscure and surprising. Definitely not recommended :)