Skip to content

Commit

Permalink
Fixed #14568 -- Use keyword rather than positional arguments for form…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
freakboy3742 committed Oct 28, 2010
1 parent 9962f35 commit 8bc2f2a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions django/views/generic/edit.py
Expand Up @@ -33,8 +33,8 @@ def get_form(self, form_class):
""" """
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:
Expand Down Expand Up @@ -84,8 +84,8 @@ def get_form(self, form_class):
""" """
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,
) )
Expand Down

0 comments on commit 8bc2f2a

Please sign in to comment.