Re: [Django] #9061: formsets with can_delete=True shouldn't add delete field to extra forms

32 views
Skip to first unread message

Django

unread,
Jun 4, 2015, 9:54:44 AM6/4/15
to django-...@googlegroups.com
#9061: formsets with can_delete=True shouldn't add delete field to extra forms
-----------------------------+--------------------------------------
Reporter: gsf | Owner: danielward
Type: New feature | Status: assigned
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by danielward):

* owner: nobody => danielward
* status: new => assigned


Comment:

While I can understand how from a usability perspective this could be
confusing, the ability to delete can also be a useful way to discard a new
form entry rather than having to clear each populated field for the given
form(s).

As a result, I propose adding a `can_delete_extra` option to formsets,
which allow developers to decide whether they wish to omit deletion fields
from their formsets without having to write any any additional logic in to
their templates/views.

I'm about to attach the relevant patches. If accepted, I'm happy to
provide a patch to public documentation for reference also.

--
Ticket URL: <https://code.djangoproject.com/ticket/9061#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 4, 2015, 9:55:20 AM6/4/15
to django-...@googlegroups.com
#9061: formsets with can_delete=True shouldn't add delete field to extra forms
-----------------------------+--------------------------------------
Reporter: gsf | Owner: danielward
Type: New feature | Status: assigned
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by danielward):

* Attachment "before.patch" added.

Latest 'before' test to confirm behaviour

--
Ticket URL: <https://code.djangoproject.com/ticket/9061>

Django

unread,
Jun 4, 2015, 9:55:53 AM6/4/15
to django-...@googlegroups.com
#9061: formsets with can_delete=True shouldn't add delete field to extra forms
-----------------------------+--------------------------------------
Reporter: gsf | Owner: danielward
Type: New feature | Status: assigned
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by danielward):

* Attachment "potential-solution.patch" added.

Potential solution by adding in 'can_delete_extra' option

Django

unread,
Jun 4, 2015, 9:56:30 AM6/4/15
to django-...@googlegroups.com
#9061: formsets with can_delete=True shouldn't add delete field to extra forms
-----------------------------+--------------------------------------
Reporter: gsf | Owner: danielward
Type: New feature | Status: assigned
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by danielward):

* Attachment "after.patch" added.

Tests introduced to ensure all is well following introduction of potential
solution

Django

unread,
Jun 15, 2015, 9:39:56 AM6/15/15
to django-...@googlegroups.com
#9061: formsets with can_delete=True shouldn't add delete field to extra forms
-----------------------------+--------------------------------------
Reporter: gsf | Owner: danielward
Type: New feature | Status: assigned
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by timgraham):

* needs_tests: 1 => 0


Comment:

[https://github.com/django/django/pull/4772 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/9061#comment:10>

Django

unread,
Jul 3, 2015, 1:14:49 PM7/3/15
to django-...@googlegroups.com
#9061: formsets with can_delete=True shouldn't add delete field to extra forms
-----------------------------+--------------------------------------
Reporter: gsf | Owner: danielward
Type: New feature | Status: assigned
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by timgraham):

* needs_better_patch: 0 => 1


Comment:

Left comments for improvement on the PR.

--
Ticket URL: <https://code.djangoproject.com/ticket/9061#comment:11>

Django

unread,
Sep 21, 2015, 3:28:47 AM9/21/15
to django-...@googlegroups.com
#9061: formsets with can_delete=True shouldn't add delete field to extra forms
-----------------------------+--------------------------------------
Reporter: gsf | Owner: danielward
Type: New feature | Status: assigned
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------

Comment (by danielward):

Addressed points raised in PR (4772) and opened new PR (5323) as advised.

--
Ticket URL: <https://code.djangoproject.com/ticket/9061#comment:12>

Django

unread,
Sep 22, 2015, 8:57:47 AM9/22/15
to django-...@googlegroups.com
#9061: formsets with can_delete=True shouldn't add delete field to extra forms
-----------------------------+--------------------------------------
Reporter: gsf | Owner: danielward
Type: New feature | Status: assigned
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------

Comment (by timgraham):

Thanks for the updating patch. After you do so, don't forget to uncheck
"Patch needs improvement" so the ticket returns to the review queue. I'll
leave it checked for now as we've hit the feature freeze for 1.9 and the
patch will need to be updated for 1.10 once we cut the stable/1.9.x branch
this week.

--
Ticket URL: <https://code.djangoproject.com/ticket/9061#comment:13>

Django

unread,
Sep 24, 2015, 9:19:10 AM9/24/15
to django-...@googlegroups.com
#9061: formsets with can_delete=True shouldn't add delete field to extra forms
-----------------------------+--------------------------------------
Reporter: gsf | Owner: danielward
Type: New feature | Status: assigned
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------

Comment (by danielward):

Thanks Tim, I've updated the version number in the associated
documentation from 1.9 to 1.10 accordingly. I'll update the ticket once
the automated builds have succeeded.

--
Ticket URL: <https://code.djangoproject.com/ticket/9061#comment:14>

Django

unread,
Sep 24, 2015, 9:46:10 AM9/24/15
to django-...@googlegroups.com
#9061: formsets with can_delete=True shouldn't add delete field to extra forms
-----------------------------+--------------------------------------
Reporter: gsf | Owner: danielward
Type: New feature | Status: assigned
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by danielward):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/9061#comment:15>

Django

unread,
Sep 25, 2015, 9:53:39 AM9/25/15
to django-...@googlegroups.com
#9061: formsets with can_delete=True shouldn't add delete field to extra forms
-----------------------------+--------------------------------------
Reporter: gsf | Owner: danielward
Type: New feature | Status: assigned
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by timgraham):

* needs_better_patch: 0 => 1


Comment:

The new option should be available on model formsets too.

--
Ticket URL: <https://code.djangoproject.com/ticket/9061#comment:16>

Django

unread,
Jun 20, 2020, 4:19:20 PM6/20/20
to django-...@googlegroups.com
#9061: formsets with can_delete=True shouldn't add delete field to extra forms
---------------------------------+---------------------------------------
Reporter: Gabriel Farrell | Owner: David Smith

Type: New feature | Status: assigned
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
---------------------------------+---------------------------------------
Changes (by David Smith):

* owner: Daniel Ward => David Smith


--
Ticket URL: <https://code.djangoproject.com/ticket/9061#comment:17>

Django

unread,
Jun 22, 2020, 3:50:37 PM6/22/20
to django-...@googlegroups.com
#9061: formsets with can_delete=True shouldn't add delete field to extra forms
---------------------------------+---------------------------------------
Reporter: Gabriel Farrell | Owner: David Smith
Type: New feature | Status: assigned
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+---------------------------------------
Changes (by David Smith):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/9061#comment:18>

Django

unread,
Jun 23, 2020, 5:57:13 AM6/23/20
to django-...@googlegroups.com
#9061: formsets with can_delete=True shouldn't add delete field to extra forms
-------------------------------------+-------------------------------------

Reporter: Gabriel Farrell | Owner: David
| Smith
Type: New feature | Status: assigned
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/9061#comment:19>

Django

unread,
Jun 24, 2020, 4:06:30 AM6/24/20
to django-...@googlegroups.com
#9061: formsets with can_delete=True shouldn't add delete field to extra forms
-------------------------------------+-------------------------------------
Reporter: Gabriel Farrell | Owner: David
| Smith
Type: New feature | Status: closed
Component: Forms | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"162765d6c3182e36095d29543e21b44b908625fc" 162765d6]:
{{{
#!CommitTicketReference repository=""
revision="162765d6c3182e36095d29543e21b44b908625fc"
Fixed #9061 -- Allowed FormSets to disable deleting extra forms.

Thanks to Dan Ward for the initial patch.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/9061#comment:20>

Django

unread,
Aug 18, 2020, 3:37:35 AM8/18/20
to django-...@googlegroups.com
#9061: formsets with can_delete=True shouldn't add delete field to extra forms
-------------------------------------+-------------------------------------
Reporter: Gabriel Farrell | Owner: David
| Smith
Type: New feature | Status: closed
Component: Forms | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"35b03788b0607c1f8d2b64e4fa9e1669b0907ea4" 35b03788]:
{{{
#!CommitTicketReference repository=""
revision="35b03788b0607c1f8d2b64e4fa9e1669b0907ea4"
Refs #9061 -- Allowed GenericInlineFormSet to disable deleting extra
forms.

Follow up to 162765d6c3182e36095d29543e21b44b908625fc.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/9061#comment:21>

Reply all
Reply to author
Forward
0 new messages