[[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.
* 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>
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>
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>
Comment (by jonash):
bump
--
Ticket URL: <https://code.djangoproject.com/ticket/20133#comment:4>
Comment (by jonash):
bump
--
Ticket URL: <https://code.djangoproject.com/ticket/20133#comment:5>
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>
* cc: areski (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/20133#comment:7>
* 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>
* owner: nobody => areski
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/20133#comment:9>
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>
Comment (by areski):
follow-up PR for the refactoring part with a small correction
--
Ticket URL: <https://code.djangoproject.com/ticket/20133#comment:11>
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>
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>
* 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>
* needs_docs: 1 => 0
* needs_tests: 1 => 0
Comment:
Tests + release notes added
--
Ticket URL: <https://code.djangoproject.com/ticket/20133#comment:15>
* 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>