1
0
mirror of https://github.com/django/django.git synced 2025-10-25 14:46:09 +00:00

Fixed #16479 - Forms generated from formsets use ErrorList instead of supplied error_class

Patch with tests from charettes, updated.
This commit is contained in:
Ludovic Delaveau
2012-10-04 09:24:23 -04:00
committed by Luke Plant
parent cc83a4af0c
commit 7a44dc555a
2 changed files with 15 additions and 1 deletions

View File

@@ -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