Commit Graph

6 Commits

Author SHA1 Message Date
cb8fd07fd7 Don't pretend that notifications for m2m works
They don't... And there is no easy way to make them work either, given
the way that signals are called for m2ms.
2016-12-17 14:25:55 +01:00
d9c8c089cb Handle migrated records with NULL in them when building diff 2016-11-07 20:17:58 +01:00
6a65f96476 Fix(ish) notifications for new objects with Unicode in value
Previous code triggered a conversion from unicode to ascii inside the
django framework, which would throw an exception when the object itself
returned unicode in the name.

The new version will work around that by actually checking the primary
key first.

This still doesn't work insofar that any changes to a many2many fields
are now lost. This did not work properly before either, but this
probably made it a bit work. We definitely need to fix this properly at
some point, probably by using the m2m_changed signal handler (but it's
not straight forward as this is now a separate signal and we'll somehow
want to track this indepdendently)
2016-08-22 11:50:21 +02:00
fd689e01c9 module_name has been renamed to model_name 2016-05-14 19:49:12 +02:00
10656c603f Use difflib to show differences when an object is edited
This makes for a much easier-to-read output, especially when the
modified field is more than one line.
2016-03-07 22:02:24 +01:00
8058accee0 Get rid of PgModel, replacing it with simple signals
We were already using signals for everything except delete, and even
in our old version of django the delete signal exists (it didn't exist
when this code was first written).

Django doesn't really like models to be OOP like this, so keeping PgModel
would cause issues with upcoming changes in django 1.8. Using simple functions
is easier, and the actual functionality is replicated straight off.
2016-03-07 21:41:45 +01:00