#34689 closed New feature (duplicate)
Simplify usage of InlineFormSet in Class-based generic views
Reported by: | CyberFox001 | Owned by: | nobody |
---|---|---|---|
Component: | Generic views | Version: | 4.2 |
Severity: | Normal | Keywords: | InlineFormSet |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When you have 2 models, A and B, with B linked to A with a ForeignKey, you sometimes want to let user edit an instance of A with its linked B instances.
With django.contrib.admin you can easilly do that with ModelAdmin and StackedInline, or other inline, classes.
But not with Class-based generic views like CreateView and UpdateView.
In this case, if I understand it correctly, you need to override get_context_data() and form_valid() to manage the InlineFormSet.
It would be nice if we have a more easy way to do it. Something similar to what we have in ModelAdmin ?
Change History (3)
follow-up: 2 comment:1 by , 17 months ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
follow-up: 3 comment:2 by , 17 months ago
Replying to Mariusz Felisiak:
Duplicate of #16256.
This ticket is closed and have no more activity since 8 years.
Is this feature a "No and never" ?
comment:3 by , 17 months ago
Replying to CyberFox001:
Is this feature a "No and never" ?
IMO, yes, however you can follow triaging guidelines with regards to wontfix tickets and take this to the mailing list or the Django Forum.
Duplicate of #16256.