Opened 4 years ago

Closed 4 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 4 years ago by belegnar

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to belegnar
  • Patch needs improvement unset

comment:2 Changed 4 years ago by belegnar

  • Needs documentation set
  • Needs tests set

comment:3 Changed 4 years ago by kmtracey

  • Resolution set to wontfix
  • Status changed from new to closed

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

comment:4 Changed 4 years ago by belegnar

  • Resolution wontfix deleted
  • Status changed from closed to reopened

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 4 years ago by lukeplant

  • Resolution set to wontfix
  • Status changed from reopened to closed

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

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