Opened 9 years ago

Closed 9 years ago

#5993 closed (fixed)

define renderer for RadioSelect widget at the class level

Reported by: Max Derkachev <mderk@…> Owned by: nobody
Component: Forms Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: yes
Easy pickings: UI/UX:

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)

radioselect.patch (649 bytes) - added by Max Derkachev <mderk@…> 9 years ago.

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by Max Derkachev <mderk@…>

Attachment: radioselect.patch added

comment:1 Changed 9 years ago by Gary Wilson

Needs tests: set
Patch needs improvement: set
Summary: [patch] newforms: define renderer for RadioSelect widget at the class leveldefine renderer for RadioSelect widget at the class level
Triage Stage: UnreviewedAccepted

comment:2 Changed 9 years ago by Gary Wilson

Resolution: fixed
Status: newclosed

(In [6717]) Fixed #5993 -- Made RadioSelect easier to subclass by giving it a default renderer as a class attribute.

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