mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
[1.5.x] Fixed #19445 -- Skip admin fieldsets validation when the ModelAdmin.get_form() method is overridden.
Backport of 0694d2196f
This commit is contained in:
parent
f28fbe7314
commit
e18bd68dbc
3 changed files with 36 additions and 7 deletions
|
@ -1096,6 +1096,13 @@ 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_fieldsets(self, request, obj=None)
|
||||
|
||||
The ``get_fieldsets`` method is given the ``HttpRequest`` and the ``obj``
|
||||
being edited (or ``None`` on an add form) and is expected to return a list
|
||||
of two-tuples, in which each two-tuple represents a ``<fieldset>`` on the
|
||||
admin form page, as described above in the :attr:`ModelAdmin.fieldsets` section.
|
||||
|
||||
.. method:: ModelAdmin.get_list_filter(self, request)
|
||||
|
||||
.. versionadded:: 1.5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue