| Conditions | 3 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | from django.forms.models import inlineformset_factory |
||
| 31 | def get_factory_kwargs(self): |
||
| 32 | """ |
||
| 33 | Returns the keyword arguments for calling the formset factory |
||
| 34 | """ |
||
| 35 | kwargs = {} |
||
| 36 | kwargs.update({ |
||
| 37 | 'can_delete': self.can_delete, |
||
| 38 | 'extra': self.extra, |
||
| 39 | 'exclude': self.exclude, |
||
| 40 | 'fields': self.fields, |
||
| 41 | 'formfield_callback': self.formfield_callback, |
||
| 42 | 'fk_name': self.fk_name, |
||
| 43 | }) |
||
| 44 | if self.formset_class: |
||
| 45 | kwargs['formset'] = self.formset_class |
||
| 46 | |||
| 47 | if self.child_form: |
||
| 48 | kwargs['form'] = self.child_form |
||
| 49 | return kwargs |
||
| 50 |