django-model-utils/model_utils/tests
Matthew Schinckel 3496fe4291 Use a signal handler instead of patching save.
References #83.

Instead of patching the save method of a tracked model class, we can use
a signal handler on post_save, which means we can still pickle our model
class.

Note we can't just listen for the signal from the class we have, but
instead listen for all post_save signals. This means we actually install
a new signal handler for each tracked model class, which fires on all
model save occurrences (and returns immediately if this handler doesn't care).

We probably could improve this to have a registry of tracked models, or
something, that allows us to just install one signal handler, and filter
according to membership.
2014-05-12 14:32:59 +09:30
..
__init__.py initial import (with InheritanceCastModel) 2009-07-02 14:03:02 -04:00
fields.py Removed reinvented wheel 2013-08-12 13:22:34 +04:00
models.py Fix InheritanceManager when the model has a self reference. 2014-02-19 15:28:01 -06:00
tests.py Use a signal handler instead of patching save. 2014-05-12 14:32:59 +09:30