Fields¶
Reference¶
Contains all the Django fields for select2-chained.
-
class
django_select2_chained.fields.ChainedAutoModelSelect2FieldMixin(*args, **kwargs)[source]¶ A mixin for subclasses of AutoModelSelect2Field that adds chaining functionality.
The attached field gets filtered by another field in the form, specified by the chain_field attribute. The selected option in the chain_field limits the queryset in the current field.
-
class
django_select2_chained.fields.ChainedAutoModelSelect2Field(*args, **kwargs)[source]¶ An
AutoModelSelect2Fieldwith chaining functionality.
-
class
django_select2_chained.fields.RequestSpecificAutoModelSelect2Field(*args, **kwargs)[source]¶ An AutoHeavy field whose queryset is determined from the current request parameter.
This is done by using get_queryset method instead of the class-level queryset property. Allows using the same AutoHeavy field instance between multiple requests and having request-specific data.
-
class
django_select2_chained.fields.ChainedRequestSpecificAutoModelSelect2Field(*args, **kwargs)[source]¶ A
RequestSpecificAutoModelSelect2Fieldwith chaining functionality.