Django

Code

Ticket #6939 (closed: duplicate)

Opened 8 months ago

Last modified 8 months ago

ModelForm doesn't work correctly when initial is a MultiValueDict

Reported by: Matthias Pronk <django@masida.nl> Assigned to: nobody
Milestone: Component: Forms
Version: SVN Keywords: newforms, admin
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

modeladmin_initial_parameters.diff (1.8 kB) - added by Matthias Pronk <django@masida.nl> on 04/01/08 14:21:08.

Change History

04/01/08 14:21:08 changed by Matthias Pronk <django@masida.nl>

  • attachment modeladmin_initial_parameters.diff added.

04/01/08 14:28:12 changed by brosner

  • needs_better_patch changed.
  • stage changed from Unreviewed to Ready for checkin.
  • needs_tests changed.
  • needs_docs changed.

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

04/01/08 20:57:19 changed by mattmcc

See also #6314.

04/01/08 21:20:09 changed by brosner

  • status changed from new to closed.
  • resolution set to duplicate.

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.


Add/Change #6939 (ModelForm doesn't work correctly when initial is a MultiValueDict)




Change Properties
Action