summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorLoic Bistuer <loic.bistuer@sixmedia.com>2013-07-31 12:52:11 +0700
committerTim Graham <timograham@gmail.com>2013-08-04 09:14:18 -0400
commitebb3e50243448545c7314a1932a9067ddca5960b (patch)
tree5e4af9ef2bf3a9952e6410ef18366340b9523772 /docs/ref
parent61ecb5f48a4732f1471f858c64904ec1c4763925 (diff)
Introduced ModelAdmin.get_fields() and refactored get_fieldsets() to use it.
Refs #18681. This also starts the deprecation of ModelAdmin.declared_fieldsets
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/admin/index.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index 40ec514331..04dc52a3a1 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -1218,6 +1218,14 @@ templates used by the :class:`ModelAdmin` views:
changelist that will be linked to the change view, as described in the
:attr:`ModelAdmin.list_display_links` section.
+.. method:: ModelAdmin.get_fields(self, request, obj=None)
+
+ .. versionadded:: 1.7
+
+ The ``get_fields`` method is given the ``HttpRequest`` and the ``obj``
+ being edited (or ``None`` on an add form) and is expected to return a list
+ of fields, as described above in the :attr:`ModelAdmin.fields` section.
+
.. method:: ModelAdmin.get_fieldsets(self, request, obj=None)
The ``get_fieldsets`` method is given the ``HttpRequest`` and the ``obj``