Make redirection URLs customizable in ModelAdmin views
As originated in , the
save_add method has a
post_url_continue argument to customize what page you should be
redirected to after saving a new object. This is very useful, but all other redirects are hard coded in all the views, including the
save_change methods. Currently, those methods assume that there is only one standard way to route URLs in admin. This is a major drawback if you want to customize the URL scheme of your application's admin.
The proposed patch moves all hard-coded URLs to arguments of the corresponding methods. Those arguments are set to a default value, so the change is backward compatible. The benefit here, is that you can re-use the views and control where the user is redirected to after the view is processed.