mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #24941 -- Added ModelAdmin.get_exclude().
Thanks Ola Sitarska for the initial patch.
This commit is contained in:
parent
c60feb6999
commit
bf91be83d5
4 changed files with 105 additions and 10 deletions
|
@ -1459,6 +1459,14 @@ templates used by the :class:`ModelAdmin` views:
|
|||
names on the changelist that will be linked to the change view, as described
|
||||
in the :attr:`ModelAdmin.list_display_links` section.
|
||||
|
||||
.. method:: ModelAdmin.get_exclude(request, obj=None)
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
The ``get_exclude`` 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 in :attr:`ModelAdmin.exclude`.
|
||||
|
||||
.. method:: ModelAdmin.get_fields(request, obj=None)
|
||||
|
||||
The ``get_fields`` method is given the ``HttpRequest`` and the ``obj``
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue