summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorLudovic Delaveau <ldelaveau@gmail.com>2012-10-04 09:24:23 -0400
committerLuke Plant <L.Plant.98@cantab.net>2012-10-13 15:28:20 +0100
commit7a44dc555a3c9bfd1691ebb346b91f25d2f94c7d (patch)
treefc8295b0aa4c8eead78c8e8cbdef08cd550a1759 /django/forms
parentcc83a4af0c51627bcdd566e4c01dcabcae51212c (diff)
Fixed #16479 - Forms generated from formsets use ErrorList instead of supplied error_class
Patch with tests from charettes, updated.
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/formsets.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/django/forms/formsets.py b/django/forms/formsets.py
index 42d25fac6d..c646eed506 100644
--- a/django/forms/formsets.py
+++ b/django/forms/formsets.py
@@ -123,7 +123,11 @@ class BaseFormSet(object):
"""
Instantiates and returns the i-th form instance in a formset.
"""
- defaults = {'auto_id': self.auto_id, 'prefix': self.add_prefix(i)}
+ defaults = {
+ 'auto_id': self.auto_id,
+ 'prefix': self.add_prefix(i),
+ 'error_class': self.error_class,
+ }
if self.is_bound:
defaults['data'] = self.data
defaults['files'] = self.files