1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #494 -- Added ability to specify classes on admin inline fieldsets.

This includes the ability to collapse inlines by specifying a class named
'collapse'.
This commit is contained in:
Karen Tracey
2015-11-07 10:46:50 -05:00
committed by Tim Graham
parent 63a6a653d4
commit 5399ccc0f4
8 changed files with 43 additions and 1 deletions

View File

@@ -2058,6 +2058,16 @@ The ``InlineModelAdmin`` class adds:
parent model fails to validate, it may be left in an inconsistent state as
described in the warning in :ref:`validation-on-modelform`.
.. attribute:: InlineModelAdmin.classes
.. versionadded:: 1.10
A list or tuple containing extra CSS classes to apply to the fieldset that
is rendered for the inlines. Defaults to ``None``. As with classes
configured in :attr:`~ModelAdmin.fieldsets`, inlines with a ``collapse``
class will be initially collapsed and their header will have a small "show"
link.
.. attribute:: InlineModelAdmin.extra
This controls the number of extra forms the formset will display in