mirror of
https://github.com/django/django.git
synced 2025-05-06 06:56:30 +00:00
[1.6.x] Added cross reference in admin docs to topic about saving objects in formsets.
Backport of 388c6038fd from master
This commit is contained in:
parent
deb11b0edf
commit
aa9e90d849
@ -1136,7 +1136,7 @@ templates used by the :class:`ModelAdmin` views:
|
|||||||
``ModelForm`` instance and a boolean value based on whether it is adding or
|
``ModelForm`` instance and a boolean value based on whether it is adding or
|
||||||
changing the parent object.
|
changing the parent object.
|
||||||
|
|
||||||
For example to attach ``request.user`` to each changed formset
|
For example, to attach ``request.user`` to each changed formset
|
||||||
model instance::
|
model instance::
|
||||||
|
|
||||||
class ArticleAdmin(admin.ModelAdmin):
|
class ArticleAdmin(admin.ModelAdmin):
|
||||||
@ -1147,6 +1147,8 @@ templates used by the :class:`ModelAdmin` views:
|
|||||||
instance.save()
|
instance.save()
|
||||||
formset.save_m2m()
|
formset.save_m2m()
|
||||||
|
|
||||||
|
See also :ref:`saving-objects-in-the-formset`.
|
||||||
|
|
||||||
.. method:: ModelAdmin.get_ordering(request)
|
.. method:: ModelAdmin.get_ordering(request)
|
||||||
|
|
||||||
The ``get_ordering`` method takes a``request`` as parameter and
|
The ``get_ordering`` method takes a``request`` as parameter and
|
||||||
|
Loading…
x
Reference in New Issue
Block a user