[Django] #34689: Simplify usage of InlineFormSet in Class-based generic views

6 views
Skip to first unread message

Django

unread,
Jul 1, 2023, 3:51:20 PM7/1/23
to django-...@googlegroups.com
#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.

Django

unread,
Jul 2, 2023, 11:22:45 PM7/2/23
to django-...@googlegroups.com
#34689: Simplify usage of InlineFormSet in Class-based generic views
-------------------------------+--------------------------------------
Reporter: CyberFox001 | Owner: nobody
Type: New feature | Status: closed

Component: Generic views | Version: 4.2
Severity: Normal | Resolution: duplicate

Keywords: InlineFormSet | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => duplicate


Comment:

Duplicate of #16256.

--
Ticket URL: <https://code.djangoproject.com/ticket/34689#comment:1>

Django

unread,
Jul 6, 2023, 4:57:54 PM7/6/23
to django-...@googlegroups.com
#34689: Simplify usage of InlineFormSet in Class-based generic views
-------------------------------+--------------------------------------
Reporter: CyberFox001 | Owner: nobody
Type: New feature | Status: closed
Component: Generic views | Version: 4.2
Severity: Normal | Resolution: duplicate
Keywords: InlineFormSet | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by CyberFox001):

Replying to [comment:1 Mariusz Felisiak]:
> Duplicate of #16256.


This ticket is closed and have no more activity since 8 years.

Is this feature a "No and never" ?

--
Ticket URL: <https://code.djangoproject.com/ticket/34689#comment:2>

Django

unread,
Jul 7, 2023, 12:00:56 AM7/7/23
to django-...@googlegroups.com
#34689: Simplify usage of InlineFormSet in Class-based generic views
-------------------------------+--------------------------------------
Reporter: CyberFox001 | Owner: nobody
Type: New feature | Status: closed
Component: Generic views | Version: 4.2
Severity: Normal | Resolution: duplicate
Keywords: InlineFormSet | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Mariusz Felisiak):

Replying to [comment:2 CyberFox001]:


> Is this feature a "No and never" ?

IMO, yes, however you can
[https://docs.djangoproject.com/en/stable/internals/contributing/triaging-
tickets/#closing-tickets follow triaging guidelines with regards to
wontfix tickets] and take this to the mailing list or the Django Forum.

--
Ticket URL: <https://code.djangoproject.com/ticket/34689#comment:3>

Reply all
Reply to author
Forward
0 new messages