Opened 5 years ago

Closed 5 years ago

#17307 closed New feature (wontfix)

Admin.site.register() upgrade

Reported by: admin@… Owned by: Belegnar
Component: contrib.admin Version:
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It will be greate if admin.site.register() accepts admin class name along with admin class itself.

Change History (5)

comment:1 Changed 5 years ago by Belegnar

Owner: changed from nobody to Belegnar

comment:2 Changed 5 years ago by Belegnar

Needs documentation: set
Needs tests: set

comment:3 Changed 5 years ago by Karen Tracey

Resolution: wontfix
Status: newclosed

I disagree, I see no reason for adding this additional complexity.

comment:4 Changed 5 years ago by Belegnar

Resolution: wontfix
Status: closedreopened

It will be usefull for automative model class registration in admin panel with ModelAdmin child.

Now there is no way to get list of classes, declared in current module, but one can get local scope with dir(). But dir() returns only names, not classes.

comment:5 Changed 5 years ago by Luke Plant

Resolution: wontfix
Status: reopenedclosed

You can use locals() to get all objects in local scope.

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