Opened 17 years ago
Closed 17 years ago
#5993 closed (fixed)
define renderer for RadioSelect widget at the class level
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
Currently the only standard way to customize radio field display is to pass custom renderer to the RadioSelect constructor.
The patch allows to define renderer for RadioSelect widget at the class level to allow redefine it in a subclass. E.g
class MyRadioFieldRenderer(RadioFieldRenderer): .................. class MyRadioSelect(RadioSelect): renderer = MyRadioFieldRenderer
Attachments (1)
Change History (3)
by , 17 years ago
Attachment: | radioselect.patch added |
---|
comment:1 by , 17 years ago
Needs tests: | set |
---|---|
Patch needs improvement: | set |
Summary: | [patch] newforms: define renderer for RadioSelect widget at the class level → define renderer for RadioSelect widget at the class level |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [6717]) Fixed #5993 -- Made
RadioSelect
easier to subclass by giving it a defaultrenderer
as a class attribute.