Opened 7 years ago

Closed 7 years ago

#10366 closed (wontfix)

model for MultipleChoiceField

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

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 ctao 7 years ago.

Download all attachments as: .zip

Change History (2)

Changed 7 years ago by ctao

comment:1 Changed 7 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

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