[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:
Nick Sandford 2013-02-02 13:21:50 -08:00 committed by Julien Phalip
parent f28fbe7314
commit e18bd68dbc
3 changed files with 36 additions and 7 deletions

View file

@ -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