Opened 8 years ago

Closed 8 years ago

#6939 closed (duplicate)

ModelForm doesn't work correctly when initial is a MultiValueDict

Reported by: Matthias Pronk <django@…> Owned by: nobody
Component: Forms Version: master
Severity: Keywords: newforms, admin
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


ModelForm should handle a QueryDict as initial data.

One of the uses would be in to be able to pass initial values by GET parameters (see #6938).

This patch fixes it in the ModelForm itself instead of in the Admin code.

Thanks to brosner on #django for the help! (basically fixing it ;)

Attachments (1)

modeladmin_initial_parameters.diff (1.8 KB) - added by Matthias Pronk <django@…> 8 years ago.

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by Matthias Pronk <django@…>

comment:1 Changed 8 years ago by brosner

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

I worked with masida to get this fixed. Bumping to RFC to be looked at by a core developer.

comment:2 Changed 8 years ago by mattmcc

See also #6314.

comment:3 Changed 8 years ago by brosner

  • Resolution set to duplicate
  • Status changed from new to closed

In light of #6314 I am going to close this as a duplicate and reopen #6938. Someone can bring this up on the django-dev mailing list to reopen the original ticket if there is a general use-case for this.

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