{"action":"created","issue":{"url":"https://api.github.com/repos/AndrewIngram/django-extra-views/issues/121","repository_url":"https://api.github.com/repos/AndrewIngram/django-extra-views","labels_url":"https://api.github.com/repos/AndrewIngram/django-extra-views/issues/121/labels{/name}","comments_url":"https://api.github.com/repos/AndrewIngram/django-extra-views/issues/121/comments","events_url":"https://api.github.com/repos/AndrewIngram/django-extra-views/issues/121/events","html_url":"https://github.com/AndrewIngram/django-extra-views/issues/121","id":127111796,"node_id":"MDU6SXNzdWUxMjcxMTE3OTY=","number":121,"title":"Changing the model forms used in CreateWithInlinesView","user":{"login":"timmyomahony","id":615149,"node_id":"MDQ6VXNlcjYxNTE0OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/615149?v=4","gravatar_id":"","url":"https://api.github.com/users/timmyomahony","html_url":"https://github.com/timmyomahony","followers_url":"https://api.github.com/users/timmyomahony/followers","following_url":"https://api.github.com/users/timmyomahony/following{/other_user}","gists_url":"https://api.github.com/users/timmyomahony/gists{/gist_id}","starred_url":"https://api.github.com/users/timmyomahony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timmyomahony/subscriptions","organizations_url":"https://api.github.com/users/timmyomahony/orgs","repos_url":"https://api.github.com/users/timmyomahony/repos","events_url":"https://api.github.com/users/timmyomahony/events{/privacy}","received_events_url":"https://api.github.com/users/timmyomahony/received_events","type":"User","site_admin":false},"labels":[{"id":296457018,"node_id":"MDU6TGFiZWwyOTY0NTcwMTg=","url":"https://api.github.com/repos/AndrewIngram/django-extra-views/labels/Documentation","name":"Documentation","color":"fbca04","default":false},{"id":293888226,"node_id":"MDU6TGFiZWwyOTM4ODgyMjY=","url":"https://api.github.com/repos/AndrewIngram/django-extra-views/labels/Ready%20to%20work%20on","name":"Ready to work on","color":"009800","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-01-17T17:50:53Z","updated_at":"2018-11-14T09:55:20Z","closed_at":"2018-11-14T09:55:20Z","author_association":"NONE","body":"I want to create a batch of invites. So there is a main form where I can name the batch and then an inline formset to allow the user to add 1+ email addresses. I want to control the forms used in each instance.\n\nWhile it seems to make use of my custom main form, it doesn't seem to be working for the inlines. It is just showing all fields for every inline.\n\nHere is an approximation of my setup:\n\n**models.py**\n\n``` python\nclass Batch(models.Model):\n    name = models.CharField(...)\n\n    other_field = ...\n\nclass Invite(models.Model):\n    email = models.EmailField(...)\n    batch = models.ForeignKey(Batch)\n\n    other_fields = ...\n```\n\n**forms.py**\n\n``` python\nfrom extra_views import InlineFormSet\n\nclass BatchModelForm(forms.ModelForm):\n    class Meta:\n        model = Batch\n        fields = [\"name\", ]\n\nclass InviteModelForm(forms.ModelForm):\n    class Meta:\n        model = Invite\n        fields = [\"email\", ]\n\nclass InviteInlineFormSet(InlineFormSet):\n    model = Invite\n    form_class = InviteModelForm  # This doesn't seem to work\n```\n\n**views.py**\n\n``` python\nfrom .forms import InviteInlineFormSet, BatchModelForm\nfrom .models import Batch\n\nclass BatchInviteView(CreateWithInlinesView):\n    model = Batch\n    form_class = BatchModelForm\n    inlines = [InviteInlineFormSet, ]\n\n    def get_success_url(self):\n        ...\n```\n\nI would expect the `form_class` attribute of the `InviteInlineFormSet` to give me control over the inline model form but this doesn't seem to be the case (while `form_class = BatchModelForm` on the `BatchInviteView` is correctly giving me control of the _main_ model form class)\n"},"comment":{"url":"https://api.github.com/repos/AndrewIngram/django-extra-views/issues/comments/438604031","html_url":"https://github.com/AndrewIngram/django-extra-views/issues/121#issuecomment-438604031","issue_url":"https://api.github.com/repos/AndrewIngram/django-extra-views/issues/121","id":438604031,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODYwNDAzMQ==","user":{"login":"sdolemelipone","id":3969107,"node_id":"MDQ6VXNlcjM5NjkxMDc=","avatar_url":"https://avatars1.githubusercontent.com/u/3969107?v=4","gravatar_id":"","url":"https://api.github.com/users/sdolemelipone","html_url":"https://github.com/sdolemelipone","followers_url":"https://api.github.com/users/sdolemelipone/followers","following_url":"https://api.github.com/users/sdolemelipone/following{/other_user}","gists_url":"https://api.github.com/users/sdolemelipone/gists{/gist_id}","starred_url":"https://api.github.com/users/sdolemelipone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdolemelipone/subscriptions","organizations_url":"https://api.github.com/users/sdolemelipone/orgs","repos_url":"https://api.github.com/users/sdolemelipone/repos","events_url":"https://api.github.com/users/sdolemelipone/events{/privacy}","received_events_url":"https://api.github.com/users/sdolemelipone/received_events","type":"User","site_admin":false},"created_at":"2018-11-14T09:55:20Z","updated_at":"2018-11-14T09:55:20Z","author_association":"COLLABORATOR","body":"Addressed in #178."}}
{"actor":{"display_login":"sdolemelipone"}}