#34689: Simplify usage of InlineFormSet in Class-based generic views
-----------------------------------------+-------------------------------
Reporter: CyberFox001 | Owner: nobody
Type: New feature | Status: new
Component: Generic views | Version: 4.2
Severity: Normal | Keywords: InlineFormSet
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+-------------------------------
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 ?
--
Ticket URL: <https://code.djangoproject.com/ticket/34689>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018913027773-d118fb66-c3ea-474b-8e86-7923b0d5615f-000000%40eu-central-1.amazonses.com.