Closed BigglesZX closed 5 years ago
from extra_views import InlineFormSetFactory class ItemInline(InlineFormSetFactory): model = Item def get_formset_kwargs(): kwargs = super(ItemInline, self).get_formset_kwargs() initial = get_some_initial_values() kwargs['form_kwargs'].update({'initial': initial}} return kwargs
Should read:
from extra_views import InlineFormSetFactory class ItemInline(InlineFormSetFactory): model = Item def get_formset_kwargs(self): kwargs = super(ItemInline, self).get_formset_kwargs() initial = get_some_initial_values() kwargs['form_kwargs'].update({'initial': initial}) return kwargs
(Missing self argument and mismatched brackets in update)
self
update
Please send PR!
Done, thanks for the prompt :)
Should read:
(Missing
self
argument and mismatched brackets inupdate
)