Model _post_load method (or similiar for a field?)
|Reported by:||wojtek@…||Owned by:||adrian|
|Component:||Database layer (models, ORM)||Version:|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
It would be nice to be able to do some operations right after an object is loaded from the DB. One example would be having some field which has to be pickled/unpickled when storing it in the DB.
This could be implemented either by adding a model _post_load method or by adding such a method to a field.
Any other workarounds which would work with current Django version that I'm missing?