summaryrefslogtreecommitdiff
path: root/django/forms/models.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2009-04-16 14:26:08 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2009-04-16 14:26:08 +0000
commit419ed444360cd9b843253f3901a96d41b003251e (patch)
tree1c632ff75409ae7025c6c110e7d0c3732a8dccfe /django/forms/models.py
parent6590061a005b8772baee1a94d7799bcb58d9841d (diff)
Fixed #10363 -- Modified ModelForm handling to ensure that excluded fields can't be saved onto the model. Thanks to jgoldberg for the report, an Alex Gaynor for the fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10575 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/forms/models.py')
-rw-r--r--django/forms/models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/forms/models.py b/django/forms/models.py
index 010d3bf61c..de5f1abb45 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -334,7 +334,8 @@ class BaseModelForm(BaseForm):
fail_message = 'created'
else:
fail_message = 'changed'
- return save_instance(self, self.instance, self._meta.fields, fail_message, commit)
+ return save_instance(self, self.instance, self._meta.fields,
+ fail_message, commit, exclude=self._meta.exclude)
save.alters_data = True