apis_core.generic.forms package
- class apis_core.generic.forms.GenericEnrichForm(*args, **kwargs)[source]
Bases:
Form
- base_fields = {}
- declared_fields = {}
- property media
Return all media required to render the widgets on this form.
- class apis_core.generic.forms.GenericFilterSetForm(*args, **kwargs)[source]
Bases:
Form
FilterSet form for generic models Adds a submit button using the django crispy form helper Adds a columns selector that lists all the fields from the model
- base_fields = {}
- clean()[source]
Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‘__all__’.
- columns_exclude = []
- declared_fields = {}
- property media
Return all media required to render the widgets on this form.
- class apis_core.generic.forms.GenericImportForm(*args, **kwargs)[source]
Bases:
Form
- base_fields = {}
- declared_fields = {}
- property media
Return all media required to render the widgets on this form.
- class apis_core.generic.forms.GenericMergeWithForm(*args, **kwargs)[source]
Bases:
Form
- base_fields = {}
- declared_fields = {}
- property media
Return all media required to render the widgets on this form.
- class apis_core.generic.forms.GenericModelForm(*args, **kwargs)[source]
Bases:
ModelForm
Model form for generic models Adds a submit button using the django crispy form helper and sets the ModelChoiceFields and ModelMultipleChoiceFields to use autocomplete replacement fields
- base_fields = {}
- declared_fields = {}
- property media
Return all media required to render the widgets on this form.
- class apis_core.generic.forms.GenericSelectMergeOrEnrichForm(*args, **kwargs)[source]
Bases:
Form
- base_fields = {}
- declared_fields = {}
- property media
Return all media required to render the widgets on this form.
Submodules
apis_core.generic.forms.fields module
- class apis_core.generic.forms.fields.IncludeExcludeField(field, *args, **kwargs)[source]
Bases:
MultiValueField
This is a custom MultiValueField that adds a ChoiceField that only provides two choices, namely exclude and include. It can be used for django-filter filters to specify which action should be done with the filter.
- compress(data_list)[source]
Return a single value for the given list of values. The values can be assumed to be valid.
For example, if this MultiValueField was instantiated with fields=(DateField(), TimeField()), this might return a datetime object created by combining the date and time in data_list.
- class apis_core.generic.forms.fields.IncludeExcludeMultiWidget(widgets, attrs=None)[source]
Bases:
MultiWidget
- decompress(value)[source]
Return a list of decompressed values for the given compressed value. The given value can be assumed to be valid, but not necessarily non-empty.
- property media
Media for a multiwidget is the combination of all media of the subwidgets.
- template_name = 'widgets/includeexclude_multiwidget.html'
- use_fieldset = False
apis_core.generic.forms.widgets module
- class apis_core.generic.forms.widgets.JSONListWidget(attrs=None)[source]
Bases:
Input
- input_type = 'text'
- property media
- template_name = 'widgets/multiline.html'