﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
6314	ModelForm doesn't support MultiValueDict as initial argument	Ilya Semenov	nobody	"The following code works fine:
{{{
#!python
class MyForm(forms.Form):
  foo = forms.CharField()

form = MyForm(initial=request.GET) # can be accessed as http://host/view/?foo=default_value
}}}

The following code does '''not''' fetch the values from request.GET:
{{{
#!python
class Foo:
  foo = models.CharField(max_length=255)

class MyForm(forms.ModelForm):
  class Meta:
    model = Foo

form = MyForm(Foo(), initial=request.GET) # does nothing
}}}

However, the following hack can be used to fetch the values from request.GET:
{{{
#!python
class Foo:
  foo = models.CharField(max_length=255)

class MyForm(forms.ModelForm):
  class Meta:
    model = Foo

form = MyForm(Foo(), initial=dict(request.GET.items())) # works as expected
}}}

Suggested behaviour: initial argument to ModelForm should accept MultiValueDict's, as the base Form implementation does."		closed	Forms	dev		wontfix			Ready for checkin	1	0	0	0	0	0
