mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-06 09:57:57 +00:00

The way signals are sent for many2many apparently changed completely between the python2 and python3 versions of the same Django version, which broke the way we did this before. And it was always a bit of a hack... Instead, reimplement notifications in the simple_form handler. This now also consolidates regular field notificationss and many2many notifications in a much cleaner way. This will, however, *only* have an effect on changes made through simple_form. Luckily that's the most common way we handle forms, with the exception being /admin/. So leave the old code in place to handle the changes through /admin/, as well as the deletion of objects. In the end the only thing lost is the ability to get m2m differences when an admin makes changes, and that's the least important of all notification. And as a bonus, the regular change notifications and in particular "new item" notifications look a lot nicer.