Opened 10 years ago

Closed 10 years ago

#10324 closed (invalid)

Fields in django.forms.models should accept QuerySet in initial arg

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


For now fields in django.forms.models as initial data accepts only list/tuple of primary keys. I think it should be more intuitive and accept also QuerySet objects. I had big problem with this today, because I was shure it accepts QuerySets as for example queryset argument does. Sorry for my english.

Change History (1)

comment:1 Changed 10 years ago by Alex Gaynor

Resolution: invalid
Status: newclosed

Both ModelChoiceField and MultipleModelChoiceField accept queryset args.

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