mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #19044 -- Made DeletionMixin
interpolate its success_url
.
Thanks to nxvl and slurms for the initial patch, ptone for the review and timo for the documentation tweaks.
This commit is contained in:
parent
5ce6a7cea2
commit
a10f390804
5 changed files with 29 additions and 8 deletions
|
@ -201,6 +201,13 @@ ProcessFormView
|
|||
The url to redirect to when the nominated object has been
|
||||
successfully deleted.
|
||||
|
||||
.. versionadded:: 1.6
|
||||
|
||||
``success_url`` may contain dictionary string formatting, which
|
||||
will be interpolated against the object's field attributes. For
|
||||
example, you could use ``success_url="/parent/%(parent_id)s/"`` to
|
||||
redirect to a URL composed out of the ``parent_id`` field on a model.
|
||||
|
||||
.. method:: get_success_url(obj)
|
||||
|
||||
Returns the url to redirect to when the nominated object has been
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue