Add available_objects soft deletable model manager#438
Add available_objects soft deletable model manager#438auvipy merged 1 commit intojazzband:masterfrom craiga:soft-deletable-rename-managers
Conversation
|
Still needs documentation. Just hoping for feedback on this approach for now. |
|
This approach looks sane to me. Perhaps the link should be to the documentation instead for this? With regards to emitting too many warnings, I believe there is a way to silence warnings which could be mentioned in the documentation. If for nothing else this will bring people the notice of how things will work in the future and change things accordingly. |
| self.assertRaises(ConnectionDoesNotExist, instance.delete, | ||
| using='other', soft=False) | ||
|
|
||
| def test_can_only_see_not_removed_entries(self): |
There was a problem hiding this comment.
Test named incorrectly.
…warning when using objects soft deletable manager.
|
One thing is not clear for me: does this mean that in the future, What is currently the recommended way to get to deleted items when using SoftDeletableModel? |
|
@rjekker Yep, that's right— I might be wrong, but there is no recommended way to get deleted items at the moment. That's part of the underlying issue this deprecation is trying to solve. |
Problem
As described in #364
Solution
.available_objectsmanager to soft deletable models..objectsmanager, but emits aDeprecationWarningfor each use of that manager.Commandments
CHANGES.rstfile to describe the changes, and quote according issue withGH-<issue_number>.