calingen.forms.widgets

App-specific implementations of django.forms.widgets.Widget.

Module Contents

Classes

PluginWidget

Widget to render the app-specific PluginField.

class calingen.forms.widgets.PluginWidget(*args, **kwargs)

Bases: django.forms.widgets.MultiWidget

Widget to render the app-specific PluginField.

decompress(value)

Expand the received value to render its components in different widgets.

Notes

See the corresponding calingen.forms.fields.PluginField.compress() method.

update_available_plugins(choices=())

Apply the choices to the multiple choice checkbox field.

Notes

In a normal, 1:1 relation of fields and widgets, this happens automatically during widget initialisation. However, using MultiValueField and MultiWidget, this step is not performed for the subwidgets.

The constructor of PluginField will take care of this by calling this method.