Admin sometimes uses default manager instead of custom admin manager
|Reported by:||Joeboy||Owned by:||Adrian Holovaty|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I'm trying to make it so that my model's default manager returns a subset of the objects. However I want the admin to be able to administrate all the objects.
Unfortunately the admin still seems to use the default manager sometimes. It displays a list of all the model's objects, but if I try and edit one that's outside the default subset I get a 404.
boring background specifics, feel free to ignore: The specific requirement is that I want my objects to expire from the frontend at specified dates, but still be admin-able in the backend. The reason I'm doing it this way is that I'm passing a category to my template, and listing its related objects. The only way I can see to exclude expired objects from the category.object_set is by altering the default manager. If there's a better way (other than doing it all in the view) I'd be interested to hear it :-)