summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/admin/index.txt10
-rw-r--r--docs/releases/1.4.txt7
2 files changed, 17 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index 4b472e71f0..43057a31b0 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -978,6 +978,16 @@ templates used by the :class:`ModelAdmin` views:
else:
return ['name']
+.. method:: ModelAdmin.save_related(self, request, form, formsets, change)
+
+ .. versionadded:: 1.4
+
+ The ``save_related`` method is given the ``HttpRequest``, the parent
+ ``ModelForm`` instance, the list of inline formsets and a boolean value
+ based on whether the parent is being added or changed. Here you can do any
+ pre- or post-save operations for objects related to the parent. Note
+ that at this point the parent object and its form have already been saved.
+
.. method:: ModelAdmin.get_readonly_fields(self, request, obj=None)
.. versionadded:: 1.2
diff --git a/docs/releases/1.4.txt b/docs/releases/1.4.txt
index 20f1ba63cf..781093123c 100644
--- a/docs/releases/1.4.txt
+++ b/docs/releases/1.4.txt
@@ -80,6 +80,13 @@ to work similarly to how desktop GUIs do it. The new hook
:meth:`~django.contrib.admin.ModelAdmin.get_ordering` for specifying the
ordering dynamically (e.g. depending on the request) has also been added.
+``ModelAdmin.save_related()``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+A new :meth:`~django.contrib.admin.ModelAdmin.save_related` hook was added to
+:mod:`~django.contrib.admin.ModelAdmin` to ease the customization of how
+related objects are saved in the admin.
+
Tools for cryptographic signing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~