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

class Meta[source]

Bases: object

fields = []
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

class Meta[source]

Bases: object

fields = '__all__'
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.ModelImportChoiceField(queryset, *, empty_label='---------', required=True, widget=None, label=None, initial=None, help_text='', to_field_name=None, limit_choices_to=None, blank=False, **kwargs)[source]

Bases: ModelChoiceField

to_python(value)[source]

Return a string.

apis_core.generic.forms.widgets module

class apis_core.generic.forms.widgets.JSONListWidget(attrs=None)[source]

Bases: Input

class Media[source]

Bases: object

js = ['js/multiline.js']
format_value(value)[source]

Return a value as it should appear when rendered in a template.

input_type = 'text'
property media
template_name = 'widgets/multiline.html'
value_from_datadict(data, files, name)[source]

Given a dictionary of data and this widget’s name, return the value of this widget or None if it’s not provided.

class apis_core.generic.forms.widgets.NewlineSeparatedListWidget(attrs=None)[source]

Bases: Input

class Media[source]

Bases: object

js = ['js/multiline.js']
format_value(value)[source]

Return a value as it should appear when rendered in a template.

input_type = 'text'
property media
template_name = 'widgets/multiline.html'
value_from_datadict(data, files, name)[source]

Given a dictionary of data and this widget’s name, return the value of this widget or None if it’s not provided.