Opened 5 years ago

Closed 5 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:


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.

Attachments (0)

Change History (1)

comment:1 Changed 5 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.