class documentation

Simple subclass that provides a convenience method to create subsite fields.

Class Method from_enum Create a field from a subsite enum.
@classmethod
def from_enum(cls, enum: type, **kwargs) -> EasySubsiteChoiceField: ΒΆ

Create a field from a subsite enum.

All this does is pass the enum's choices and values to the constructor as choices and initial, respectively. It makes the field not required and uses a checkbox widget with the checkbox_attrs as attrs.