Opened 16 years ago

Closed 16 years ago

#10366 closed (wontfix)

model for MultipleChoiceField

Reported by: tangc Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Keywords: Field choices
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Ref: db/models/fields/init.py

class Field(object) has init with choices=None. It would be good to have a multi_choices=None

def formfield has code form_class = forms.TypedChoiceField . So It would be like the follows:

            if self.multi_choices:
                form_class = forms.MultipleChoiceField
            else:
                form_class = forms.TypedChoiceField

The minimum code change can deal with model to form with MultipleChoiceField. It worked nicely.

Attachments (1)

T10366.diff (1.4 KB ) - added by tangc 16 years ago.

Download all attachments as: .zip

Change History (2)

by tangc, 16 years ago

Attachment: T10366.diff added

comment:1 by Alex Gaynor, 16 years ago

Resolution: wontfix
Status: newclosed

There is no model field that actually stores data in a list like this, marking as wonfix.

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