Opened 16 years ago

Closed 16 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: 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)

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

Download all attachments as: .zip

Change History (3)

by Max Derkachev <mderk@…>, 16 years ago

Attachment: radioselect.patch added

comment:1 by Gary Wilson, 16 years ago

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 by Gary Wilson, 16 years ago

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