Form mixins¶
-
class
barbeque.forms.
PlaceholderFormMixin
(*args, **kwargs)¶ Adds placeholder attributes to input all visible fields. The placeholder will be named after the field label.
-
class
barbeque.forms.
ItemLimitInlineMixin
¶ Mixin that validates the min/max number of forms in an admin inline.
Usage:
class MyInlineAdmin(ItemLimitInlineMixin, admin.StackedInline): min_items = 1 max_items = 4
Please note that both options are optional and default to
None
thus no validation takes place.