Opened 16 years ago

Closed 16 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: dev
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

Description

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

Download all attachments as: .zip

Change History (4)

by Matthias Pronk <django@…>, 16 years ago

comment:1 by Brian Rosner, 16 years ago

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 by Matt McClanahan, 16 years ago

See also #6314.

comment:3 by Brian Rosner, 16 years ago

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