[Django] #20133: Admin: Add deletion summary

15 views
Skip to first unread message

Django

unread,
Mar 25, 2013, 1:53:09 PM3/25/13
to django-...@googlegroups.com
#20133: Admin: Add deletion summary
-------------------------------+--------------------
Reporter: jonash | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 1
-------------------------------+--------------------
Here's a first version of a patch that adds a short `modelname => number-
of-deleted-objects-of-that-model` map to the admin object deletion
confirmation page.

[[Image(http://i.imgur.com/g5Ltqzc.png)]]

The patch is by no means RFC, it's only meant to be a first sketch in
order to get feedback about the idea in general. I've also done some
refactoring as preparation for implementing this feature. To be specific,
there was some code that mixed logic and presentation that is now a bit
more separated; although there's still potential to reduce complexity by
factoring `get_deleted_objects` *into* the views (i.e. removing the helper
function entirely).

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

Django

unread,
Apr 1, 2013, 12:18:16 AM4/1/13
to django-...@googlegroups.com
#20133: Admin: Add deletion summary
-------------------------------+------------------------------------

Reporter: jonash | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | 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: 1
-------------------------------+------------------------------------
Changes (by julien):

* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted


Comment:

Great idea!

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

Django

unread,
Apr 7, 2013, 6:44:48 AM4/7/13
to django-...@googlegroups.com
#20133: Admin: Add deletion summary
-------------------------------+------------------------------------

Reporter: jonash | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | 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: 1
-------------------------------+------------------------------------

Comment (by jonash):

Any comments on the patch or the idea in general? Feature requests? Site
design/structure?

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

Django

unread,
Apr 7, 2013, 6:46:22 AM4/7/13
to django-...@googlegroups.com
#20133: Admin: Add deletion summary
-------------------------------+------------------------------------

Reporter: jonash | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | 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: 1
-------------------------------+------------------------------------

Comment (by jonash):

Btw there's some serious DRY violation in that particular area of the
admin, both in the views and templates. If anyone with a bit more
knowledge of the admin code base has any tips on how to refactor this,
please let me know.

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

Django

unread,
Sep 21, 2013, 9:33:28 AM9/21/13
to django-...@googlegroups.com
#20133: Admin: Add deletion summary
-------------------------------+------------------------------------

Reporter: jonash | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | 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: 1
-------------------------------+------------------------------------

Comment (by jonash):

bump

--
Ticket URL: <https://code.djangoproject.com/ticket/20133#comment:4>

Django

unread,
Dec 2, 2013, 7:05:38 PM12/2/13
to django-...@googlegroups.com
#20133: Admin: Add deletion summary
-------------------------------+------------------------------------

Reporter: jonash | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | 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: 1
-------------------------------+------------------------------------

Comment (by jonash):

bump

--
Ticket URL: <https://code.djangoproject.com/ticket/20133#comment:5>

Django

unread,
Aug 8, 2014, 6:50:18 PM8/8/14
to django-...@googlegroups.com
#20133: Admin: Add deletion summary
-------------------------------+------------------------------------

Reporter: jonash | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | 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: 1
-------------------------------+------------------------------------

Comment (by areski):

+1
I quite like the idea, pity we didn't get much traction on this ticket.
Maybe you should send a Pull Request on github, it might be a easier way
for core dev to rebase the patch on master and test it.

--
Ticket URL: <https://code.djangoproject.com/ticket/20133#comment:6>

Django

unread,
Aug 8, 2014, 6:50:27 PM8/8/14
to django-...@googlegroups.com
#20133: Admin: Add deletion summary
-------------------------------+------------------------------------

Reporter: jonash | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | 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: 1
-------------------------------+------------------------------------
Changes (by areski):

* cc: areski (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/20133#comment:7>

Django

unread,
Aug 12, 2014, 7:58:43 AM8/12/14
to django-...@googlegroups.com
#20133: Admin: Add deletion summary
-------------------------------+------------------------------------

Reporter: jonash | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | 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: 1
-------------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: 0 => 1


Comment:

Anyone is welcome to rebase the patch and test it. I would just say that
I'd prefer that commits separated refactoring of logic from the adding of
new features if possible as this makes the diffs smaller and easier to
review.

--
Ticket URL: <https://code.djangoproject.com/ticket/20133#comment:8>

Django

unread,
Aug 13, 2014, 7:25:38 AM8/13/14
to django-...@googlegroups.com
#20133: Admin: Add deletion summary
-------------------------------+------------------------------------
Reporter: jonash | Owner: areski
Type: New feature | Status: assigned
Component: contrib.admin | 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: 1
-------------------------------+------------------------------------
Changes (by areski):

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


--
Ticket URL: <https://code.djangoproject.com/ticket/20133#comment:9>

Django

unread,
Aug 13, 2014, 9:06:04 AM8/13/14
to django-...@googlegroups.com
#20133: Admin: Add deletion summary
-------------------------------+------------------------------------
Reporter: jonash | Owner: areski
Type: New feature | Status: assigned
Component: contrib.admin | 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: 1
-------------------------------+------------------------------------

Comment (by areski):

here the new PR https://github.com/django/django/pull/3052
I followed timgraham advice and so removed the refactoring part, I will
send an other PR for it

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

Django

unread,
Aug 13, 2014, 9:35:07 AM8/13/14
to django-...@googlegroups.com
#20133: Admin: Add deletion summary
-------------------------------+------------------------------------
Reporter: jonash | Owner: areski
Type: New feature | Status: assigned
Component: contrib.admin | 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: 1
-------------------------------+------------------------------------

Comment (by areski):

follow-up PR for the refactoring part with a small correction

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

Django

unread,
Aug 13, 2014, 10:29:53 AM8/13/14
to django-...@googlegroups.com
#20133: Admin: Add deletion summary
-------------------------------+------------------------------------
Reporter: jonash | Owner: areski
Type: New feature | Status: assigned
Component: contrib.admin | 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: 1
-------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"3687aa00932c0e951643790fcb0f863049aa0446"]:
{{{
#!CommitTicketReference repository=""
revision="3687aa00932c0e951643790fcb0f863049aa0446"
Simplified admin delete confirmation templates using {% elif %}.

Thanks jonash for the initial patch; refs #20133.
}}}

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

Django

unread,
Aug 14, 2014, 7:21:12 AM8/14/14
to django-...@googlegroups.com
#20133: Admin: Add deletion summary
-------------------------------+------------------------------------
Reporter: jonash | Owner: areski
Type: New feature | Status: assigned
Component: contrib.admin | 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: 1
-------------------------------+------------------------------------

Comment (by areski):

Ignore the previous PR, it breaks many things on Django.
This new one is more straightforward and should pass all Django tests.
https://github.com/django/django/pull/3063

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

Django

unread,
Aug 14, 2014, 10:29:32 AM8/14/14
to django-...@googlegroups.com
#20133: Admin: Add deletion summary
-------------------------------+------------------------------------
Reporter: jonash | Owner: areski
Type: New feature | Status: assigned
Component: contrib.admin | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0

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

* needs_better_patch: 1 => 0
* needs_tests: 0 => 1
* needs_docs: 0 => 1


Comment:

Looks simple enough, but needs tests and release notes.

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

Django

unread,
Aug 14, 2014, 11:08:49 AM8/14/14
to django-...@googlegroups.com
#20133: Admin: Add deletion summary
-------------------------------+------------------------------------
Reporter: jonash | Owner: areski
Type: New feature | Status: assigned
Component: contrib.admin | 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: 1
-------------------------------+------------------------------------
Changes (by areski):

* needs_docs: 1 => 0
* needs_tests: 1 => 0


Comment:

Tests + release notes added

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

Django

unread,
Aug 14, 2014, 1:57:20 PM8/14/14
to django-...@googlegroups.com
#20133: Admin: Add deletion summary
-------------------------------+------------------------------------
Reporter: jonash | Owner: areski
Type: New feature | Status: closed
Component: contrib.admin | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"302145328560ded44bcfded8a67a1e7df08b411b"]:
{{{
#!CommitTicketReference repository=""
revision="302145328560ded44bcfded8a67a1e7df08b411b"
Fixed #20133 -- Added summary to admin deletion confirmation pages.

Thanks jonash for the suggestion and initial patch.
}}}

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

Reply all
Reply to author
Forward
0 new messages