Opened 17 years ago
Closed 16 years ago
#4588 closed (fixed)
newforms-admin: Handle keyword argument `options` of `AdminSite.register`
Reported by: | yi.codeplayer at gmail dot com | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | newforms-admin |
Severity: | Keywords: | nfa-someday | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I got a simple way to handle the keyword argument options
of AdminSite.register
:
if options: admin_class = type(admin_class.__name__, (admin_class,), options)
Attachments (1)
Change History (4)
by , 17 years ago
Attachment: | handle_options.patch added |
---|
comment:1 by , 17 years ago
Needs tests: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 17 years ago
Keywords: | nfa-someday added |
---|
This isn't critical to the merge of newforms-admin. #5374 needs to be completed first. Tagging with nfa-someday.
Note:
See TracTickets
for help on using tickets.
I'm mostly ok with this solution.
options
needs to be validated, but that should probably be the responsibility ofModelAdmin
.