- It is currently quite easy to set up custom redirects after saving a new
or changed object, by overriding response_add() or response_change()
- I suggest to add a response_delete() method to ModelAdmin, called from
delete_view()
--
Ticket URL: <https://code.djangoproject.com/ticket/20558>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 1
* version: 1.5 => master
* easy: 0 => 1
* needs_docs: => 1
* stage: Unreviewed => Accepted
Comment:
This feature addition makes sense -- I've hit this limitation
[https://github.com/charettes/django-admin-
enhancer/blob/master/admin_enhancer/admin.py#L39-L46 in the past].
I will mark as easy picking since it's really just code moving, simple
tests and documentation writing.
Also, it might be worth adding a `render_delete_form` method while we're
here, to be consistent with `add_view`
(`response_add`/`render_change_form(add=True)`) and `change_view`
(`response_change`, `render_change_form(add=False)`).
--
Ticket URL: <https://code.djangoproject.com/ticket/20558#comment:1>
* status: new => assigned
* owner: nobody => zyegfryed
--
Ticket URL: <https://code.djangoproject.com/ticket/20558#comment:2>
Comment (by zyegfryed):
As far as I've checked, there's no documentation for
`response_add/response_change/render_change_form`. Shall we add some
within this ticket?
Also, there's only one test for all the mentioned hooks, targeting only
the `post_url_continue` parameter form `response_add` method. Shall we add
some more?
If so, where should we put them? In `tests/admin/custom_urls`? Another
app?
Thanks for your feedback.
--
Ticket URL: <https://code.djangoproject.com/ticket/20558#comment:3>
* owner: zyegfryed => polmuz
Comment:
Since this been quiet for a couple of months, I started to work on it.
Here is the pull request: https://github.com/django/django/pull/1583
--
Ticket URL: <https://code.djangoproject.com/ticket/20558#comment:4>
* has_patch: 0 => 1
* needs_tests: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/20558#comment:5>
* cc: polmuz (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/20558#comment:6>
* status: assigned => closed
* resolution: => fixed
Comment:
Fixed in 9079436 and 73de9dd.
--
Ticket URL: <https://code.djangoproject.com/ticket/20558#comment:7>