Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#13231 closed (fixed)

Make render_option() on the Select class an instance method

Reported by: bjourne Owned by: nobody
Component: Forms Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The Select widget has a method called render_options() which renders all the options on the widget. For each option, it calls the inner method render_option() to render the "<option blah>...</option>"-tag. If you are creating a custom Select widget and you only need to override how the option tags are rendered, it would be convenient if render_option() was an instance method so that you don't have to override the whole render_options() method.

Change History (3)

comment:1 by Russell Keith-Magee, 14 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Russell Keith-Magee, 14 years ago

Resolution: fixed
Status: newclosed

(In [13577]) Fixed #13679, #13231, #7287 -- Ensured that models that have ForeignKeys/ManyToManyField can use a a callable default that returns a model instance/queryset. #13679 was a regression in behavior; the other two tickets are pleasant side effects. Thanks to 3point2 for the report.

comment:3 by Russell Keith-Magee, 14 years ago

(In [13578]) [1.2.X] Fixed #13679, #13231, #7287 -- Ensured that models that have ForeignKeys/ManyToManyField can use a a callable default that returns a model instance/queryset. #13679 was a regression in behavior; the other two tickets are pleasant side effects. Thanks to 3point2 for the report.

Backport of r13577 from trunk.

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