django_choices_js API¶
apps¶
forms¶
- class django_choices_js.forms.ChoicesJsMixin(choices_opts: dict = None, *args, **kwargs)[source]¶
Bases:
objectThe base class of all Choices.js widgets.
This adds the media property that includes all necessary css and js tags for Choices.js.
- Parameters:
choices_opts (dict) – Options that are passed directly to the Choices.js constructor.
- property media¶
- class django_choices_js.forms.ChoicesJsTextInput(choices_opts: dict = None, *args, **kwargs)[source]¶
Bases:
ChoicesJsMixin,TextInputA widget for text input that allows multiple entries separated by a delimiter (default
',').Example:
text = django.forms.CharField(widget=django_choices_js.ChoicesJsTextInput, choices_opts={'maxItemCount': 3})
- Parameters:
choices_opts (dict) – Options that are passed directly to the Choices.js constructor.
- property media¶
- class django_choices_js.forms.ChoicesJsSelect(choices_opts: dict = None, *args, **kwargs)[source]¶
Bases:
ChoicesJsMixin,Select- Parameters:
choices_opts (dict) – Options that are passed directly to the Choices.js constructor.
- property media¶
- class django_choices_js.forms.ChoicesJsSelectMultiple(choices_opts: dict = None, *args, **kwargs)[source]¶
Bases:
ChoicesJsMixin,SelectMultiple- Parameters:
choices_opts (dict) – Options that are passed directly to the Choices.js constructor.
- property media¶
- class django_choices_js.forms.ChoicesJsModelMixin(choices_opts=None, *args, **kwargs)[source]¶
Bases:
ChoicesJsMixin- Parameters:
choices_opts (dict) – Options that are passed directly to the Choices.js constructor.
- class django_choices_js.forms.ChoicesJSModelSelect(choices_opts=None, *args, **kwargs)[source]¶
Bases:
ChoicesJsModelMixin,Select- Parameters:
choices_opts (dict) – Options that are passed directly to the Choices.js constructor.
- property media¶
- class django_choices_js.forms.ChoicesJSModelSelectMultiple(choices_opts=None, *args, **kwargs)[source]¶
Bases:
ChoicesJsModelMixin,SelectMultiple- Parameters:
choices_opts (dict) – Options that are passed directly to the Choices.js constructor.
- property media¶