AndrewIngram/django-extra-views — Issue #8: Need way to specify base class to override BaseInlineFormSet
Author: auzigog
Created: 2011-12-30 03:22:18+00:00
State: open

I was referencing this StackOverflow answer about [model inline formsets](http://stackoverflow.com/questions/2355532/limit-djangos-inlineformset-factory-to-only-create-new-objects/5154029#5154029).

I am trying to get my inline formset to show just the queryset I specify.

As far as I can tell, line 114 of formsets.py doesn't do what it implies it will.

```python
class BaseInlineFormSetMixin(BaseFormSetMixin):
# ...
formset = BaseInlineFormSet
# ...
```

I can't find anywhere in the code where it actually uses that specified value.

I'd like to be able to use code similar to the following and have my formset class be used when using the factory:
```python
class BaseResponseInlineFormSet(InlineFormSet):
model = Response
can_delete = False
extra = 0
formset = GenericResponseFormSet
```

I'm kind of confused by the purpose of the code there. Here are my possible explanations of how a solution might look (depending on the intention of the code in the first place):

* Change formset to formset_class
* Declare BaseInlineFormSetMixin.get_formset_class() so it gets passed on to the factory kwargs

My workaround for now is to pass it manually into get_factory_kwargs()

Thanks!