[1.5.x] Removed unusable parameters to empty_form property

Backport of 884f77bd1 from master.
This commit is contained in:
Claude Paroz 2013-01-01 20:50:13 +01:00
parent c3d919d12a
commit fff9752cb3
1 changed files with 6 additions and 8 deletions

View File

@ -157,14 +157,12 @@ class BaseFormSet(object):
return self.forms[self.initial_form_count():]
@property
def empty_form(self, **kwargs):
defaults = {
'auto_id': self.auto_id,
'prefix': self.add_prefix('__prefix__'),
'empty_permitted': True,
}
defaults.update(kwargs)
form = self.form(**defaults)
def empty_form(self):
form = self.form(
auto_id=self.auto_id,
prefix=self.add_prefix('__prefix__'),
empty_permitted=True,
)
self.add_fields(form, None)
return form