Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 9079436b0092db4a7e0031c27747d97f68b0fc5b 1 parent 73de9dd
Pablo Mouzo authored September 06, 2013 jacobian committed September 07, 2013

Showing 1 changed file with 29 additions and 0 deletions. Show diff stats Hide diff stats

  1. 29  docs/ref/contrib/admin/index.txt
29  docs/ref/contrib/admin/index.txt
@@ -1514,6 +1514,35 @@ templates used by the :class:`ModelAdmin` views:
1514 1514
     Returns an instance of the paginator to use for this view. By default,
1515 1515
     instantiates an instance of :attr:`paginator`.
1516 1516
 
  1517
+.. method:: ModelAdmin.response_add(self, request, obj, post_url_continue=None)
  1518
+
  1519
+    Determines the HttpResponse for the add_view stage.
  1520
+
  1521
+    ``response_add`` is called after the admin form is submitted and
  1522
+    just after the object and all the related instances have
  1523
+    been created and saved. You can override it to change the default behavior
  1524
+    after the object has been created.
  1525
+
  1526
+.. method:: ModelAdmin.response_change(self, request, obj)
  1527
+
  1528
+    Determines the HttpResponse for the change_view stage.
  1529
+
  1530
+    ``response_change`` is called after the admin form is submitted and
  1531
+    just after the object and all the related instances have
  1532
+    been saved. You can override it to change the default
  1533
+    behavior after the object has been changedn.
  1534
+
  1535
+.. method:: ModelAdmin.response_delete(self, request, obj_display)
  1536
+
  1537
+    Determines the HttpResponse for the delete_view stage.
  1538
+
  1539
+    ``response_delete`` is called after the object has been
  1540
+    deleted. You can override it to change the default
  1541
+    behavior after the object has been deleted.
  1542
+
  1543
+    ``obj_display`` is a string with the name of the deleted
  1544
+    object.
  1545
+
1517 1546
 Other methods
1518 1547
 ~~~~~~~~~~~~~
1519 1548
 

0 notes on commit 9079436

Please sign in to comment.
Something went wrong with that request. Please try again.