Fixed #14568 -- Use keyword rather than positional arguments for form construction. Thanks to mattmcc for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14371 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2010-10-28 02:58:06 +00:00
parent 9962f352bf
commit 8bc2f2a0b5
1 changed files with 4 additions and 4 deletions

View File

@ -33,8 +33,8 @@ class FormMixin(object):
""" """
if self.request.method in ('POST', 'PUT'): if self.request.method in ('POST', 'PUT'):
return form_class( return form_class(
self.request.POST, data=self.request.POST,
self.request.FILES, files=self.request.FILES,
initial=self.get_initial() initial=self.get_initial()
) )
else: else:
@ -84,8 +84,8 @@ class ModelFormMixin(FormMixin, SingleObjectMixin):
""" """
if self.request.method in ('POST', 'PUT'): if self.request.method in ('POST', 'PUT'):
return form_class( return form_class(
self.request.POST, data=self.request.POST,
self.request.FILES, files=self.request.FILES,
initial=self.get_initial(), initial=self.get_initial(),
instance=self.object, instance=self.object,
) )