Opened 6 years ago

Closed 6 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: UI/UX:

Description

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 6 years ago by Alex

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

Both ModelChoiceField and MultipleModelChoiceField accept queryset args.

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