Opened 18 years ago

Closed 17 years ago

#4237 closed (wontfix)

newforms form_for_model ignores radio_admin

Reported by: Robert Myers <myer0052@…> Owned by: nobody
Component: Forms Version: dev
Severity: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Building off of ticket #3268 if you specify radio_admin=True the newforms form_for_model shortcut should display the field as a radioselect field.

Attachments (2)

radio_select.diff (843 bytes ) - added by Robert Myers <myer0052@…> 18 years ago.
use RadioSelect widget if radio_admin=True
radio_select_with_tests.diff (5.7 KB ) - added by Robert Myers <myer0052@…> 17 years ago.
Patch now with tests and documentation.

Download all attachments as: .zip

Change History (9)

by Robert Myers <myer0052@…>, 18 years ago

Attachment: radio_select.diff added

use RadioSelect widget if radio_admin=True

comment:1 by Robert Myers <myer0052@…>, 18 years ago

Component: Uncategorizeddjango.newforms
Has patch: set
Owner: changed from Jacob to Adrian Holovaty

comment:2 by Chris Beaven, 17 years ago

Needs tests: set
Triage Stage: UnreviewedAccepted

Seems fair enough. Just needs some tests.

by Robert Myers <myer0052@…>, 17 years ago

Patch now with tests and documentation.

comment:3 by Chris Beaven, 17 years ago

Needs tests: unset
Triage Stage: AcceptedReady for checkin

Looks good

comment:4 by Malcolm Tredinnick, 17 years ago

Resolution: wontfix
Status: newclosed

No, we don't want to do this. It's adding an attribute to model fields that is only for presentational control. Presentation information does not belong in data models.

If you want this sort of control and still want to use form_for_model(), then use the formfield_callback attribute to control things.

comment:5 by Chris Beaven, 17 years ago

Resolution: wontfix
Status: closedreopened

Maybe I'm missing something, but radio_admin is already an attribute of model fields:
http://www.djangoproject.com/documentation/model-api/#radio-admin

What's the attribute getting added?

comment:6 by Malcolm Tredinnick, 17 years ago

Triage Stage: Ready for checkinDesign decision needed

Logically, radio_admin should go away in newforms-admin. Just like prepopulate_from, it only exists for admin presentational purposes. Adding in a new feature that depends on it will mean people get attached to (and write code that depends on) a feature that should be on death row.

Still inclined to wontfix, but I'll "design decision" it for the time being and worry about it later.

comment:7 by James Bennett, 17 years ago

Resolution: wontfix
Status: reopenedclosed

Agreeing with Malcolm, but going ahead with the wontfix; the "radio_admin" feature is going away.

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