Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add docs for `response_add`, `response_change` and `response_delete`

  • Loading branch information...
commit 9079436b0092db4a7e0031c27747d97f68b0fc5b 1 parent 73de9dd
@polmuz polmuz authored jacobian committed
Showing with 29 additions and 0 deletions.
  1. +29 −0 docs/ref/contrib/admin/index.txt
View
29 docs/ref/contrib/admin/index.txt
@@ -1514,6 +1514,35 @@ templates used by the :class:`ModelAdmin` views:
Returns an instance of the paginator to use for this view. By default,
instantiates an instance of :attr:`paginator`.
+.. method:: ModelAdmin.response_add(self, request, obj, post_url_continue=None)
+
+ Determines the HttpResponse for the add_view stage.
+
+ ``response_add`` is called after the admin form is submitted and
+ just after the object and all the related instances have
+ been created and saved. You can override it to change the default behavior
+ after the object has been created.
+
+.. method:: ModelAdmin.response_change(self, request, obj)
+
+ Determines the HttpResponse for the change_view stage.
+
+ ``response_change`` is called after the admin form is submitted and
+ just after the object and all the related instances have
+ been saved. You can override it to change the default
+ behavior after the object has been changedn.
+
+.. method:: ModelAdmin.response_delete(self, request, obj_display)
+
+ Determines the HttpResponse for the delete_view stage.
+
+ ``response_delete`` is called after the object has been
+ deleted. You can override it to change the default
+ behavior after the object has been deleted.
+
+ ``obj_display`` is a string with the name of the deleted
+ object.
+
Other methods
~~~~~~~~~~~~~
Please sign in to comment.
Something went wrong with that request. Please try again.