django-lifecycle
django-lifecycle copied to clipboard
Add a common gotchas or FAQ in the documentation
- Many to many fields:
- #120
- Admin bulk delete:
- #142
- #74
- #152
- Bulk operations
- #18
- Cascade delete:
- #89
- Adding hooks to 3rd-party objects
- #62
- Not inheriting from Lifecycle
- Bad MRO:
- #96
Would it be possible to also state somewhere that this library works on save()
and delete()
methods and not with django signals? What I mean by that is when I used this library for the first time for BEFORE/AFTER_DELELE
hooks. I assumed these will get triggered always, even object or queryset delete()
method is used. But this is not the case when queryset delete()
method is used. After checking the library source code I noticed that signals are not used, hence custom delete hook will not get called when queryset delete()
is used.
This issue relates a bit to the issue I opened earlier as well when when my delete hook didn't get called.
Would it be possible to also state somewhere that this library works on
save()
anddelete()
methods and not with django signals? What I mean by that is when I used this library for the first time forBEFORE/AFTER_DELELE
hooks. I assumed these will get triggered always, even object or querysetdelete()
method is used. But this is not the case when querysetdelete()
method is used. After checking the library source code I noticed that signals are not used, hence custom delete hook will not get called when querysetdelete()
is used.This issue relates a bit to the issue I opened earlier as well when when my delete hook didn't get called.
Yeah, we will have to add something like this to explain why it doesn't work on queryset methods. Thanks for the suggestion!
Add gotcha with has_changed
when combined with fields translated using django-modeltranslation