From 8bc2f2a0b531c9e9bf7734b05ed3d3a7e86a526e Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 28 Oct 2010 02:58:06 +0000 Subject: [PATCH] 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 --- django/views/generic/edit.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/django/views/generic/edit.py b/django/views/generic/edit.py index 1a361efd43..680d52bccc 100644 --- a/django/views/generic/edit.py +++ b/django/views/generic/edit.py @@ -33,8 +33,8 @@ class FormMixin(object): """ if self.request.method in ('POST', 'PUT'): return form_class( - self.request.POST, - self.request.FILES, + data=self.request.POST, + files=self.request.FILES, initial=self.get_initial() ) else: @@ -84,8 +84,8 @@ class ModelFormMixin(FormMixin, SingleObjectMixin): """ if self.request.method in ('POST', 'PUT'): return form_class( - self.request.POST, - self.request.FILES, + data=self.request.POST, + files=self.request.FILES, initial=self.get_initial(), instance=self.object, )