Opened 19 years ago

Closed 19 years ago

Last modified 19 years ago

#2051 closed defect (duplicate)

Admin sometimes uses default manager instead of custom admin manager

Reported by: Joeboy Owned by: Adrian Holovaty
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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 :-)

Change History (1)

comment:1 by Luke Plant, 19 years ago

Resolution: duplicate
Status: newclosed

This is described in more detail in #1855

Note: See TracTickets for help on using tickets.
Back to Top