Opened 11 years ago

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


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@…> 11 years ago.

Download all attachments as: .zip

Change History (4)

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

comment:1 Changed 11 years ago by Brian Rosner

Triage Stage: UnreviewedReady for checkin

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

comment:2 Changed 11 years ago by Matt McClanahan

See also #6314.

comment:3 Changed 11 years ago by Brian Rosner

Resolution: duplicate
Status: newclosed

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