widgets.py#
- class reorder_items_widget.widgets.ReoroderItemsWidgetMixin#
Bases:
objectWidget to make a number input a reorder items widget. The original form field will be hidden and a drag and drop handler will be rendered instead. Items in result lists or inline formsets will be reorderable by dragging the rows to their new position. The values of th index field will be updated on form submission to reflect the new order.
- build_attrs(base_attrs, extra_attrs)#
Add the CSS classes for the widget.
- class reorder_items_widget.widgets.ReorderItemsWidget(attrs=None)#
Bases:
ReoroderItemsWidgetMixin,NumberInputA NumberInput widget using the
ReoroderItemsWidgetMixin.