mirror of https://github.com/django/django.git
Removed unusable parameters to empty_form property
This commit is contained in:
parent
33f8afda3a
commit
884f77bd15
|
@ -157,14 +157,12 @@ class BaseFormSet(object):
|
||||||
return self.forms[self.initial_form_count():]
|
return self.forms[self.initial_form_count():]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def empty_form(self, **kwargs):
|
def empty_form(self):
|
||||||
defaults = {
|
form = self.form(
|
||||||
'auto_id': self.auto_id,
|
auto_id=self.auto_id,
|
||||||
'prefix': self.add_prefix('__prefix__'),
|
prefix=self.add_prefix('__prefix__'),
|
||||||
'empty_permitted': True,
|
empty_permitted=True,
|
||||||
}
|
)
|
||||||
defaults.update(kwargs)
|
|
||||||
form = self.form(**defaults)
|
|
||||||
self.add_fields(form, None)
|
self.add_fields(form, None)
|
||||||
return form
|
return form
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue