inspirehep.modules.forms.fields package

Submodules

inspirehep.modules.forms.fields.arxiv_id module

class inspirehep.modules.forms.fields.arxiv_id.ArXivField(**kwargs)[source]

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.simple.TextField

inspirehep.modules.forms.fields.doi module

DOI field.

class inspirehep.modules.forms.fields.doi.DOIField(**kwargs)[source]

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.StringField

DOIField.

inspirehep.modules.forms.fields.language module

class inspirehep.modules.forms.fields.language.LanguageField(**kwargs)[source]

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.SelectField

inspirehep.modules.forms.fields.title module

Deprecated.

class inspirehep.modules.forms.fields.title.TitleField(**kwargs)[source]

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.StringField

Deprecated.

inspirehep.modules.forms.fields.wtformsext module

This module makes all WTForms fields available in WebDeposit.

This module makes all WTForms fields available in WebDeposit, and ensure that they subclass INSPIREField for added functionality

The code is basically identical to importing all the WTForm fields and for each field make a subclass according to the pattern (using FloatField as an example):

class FloatField(INSPIREField, wtforms.FloatField):
    pass
class inspirehep.modules.forms.fields.wtformsext.FormField(*args, **kwargs)[source]

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.FormField

Deposition form field.

flags

Get flags in form of a proxy.

This proxy accumulats flags stored in this object and all children fields.

get_flags(filter_func=None)[source]

Get flags.

json_data

JSON data property.

messages

Message property.

perform_autocomplete(form, name, term, limit=50)[source]

Run auto-complete method for field.

This method should not be called directly, instead use Form.autocomplete().

post_process(form=None, formfields=[], extra_processors=[], submit=False)[source]

Run post process on each subfield.

Run post process on each subfield as well as extra processors defined on form.

process(formdata, data=<unset value>)[source]

Preprocess formdata in case we are passed a JSON data structure.

reset_field_data(exclude=[])[source]

Reset the fields.data value to that of field.object_data.

Usually not called directly, but rather through Form.reset_field_data().

Parameters:exclude – List of formfield names to exclude.
set_flags(flags)[source]

Set flags.

class inspirehep.modules.forms.fields.wtformsext.FieldList(*args, **kwargs)[source]

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.FieldList

Deposition field list.

bound_field(idx)[source]

Create a bound field for index.

data

Adapted to use self.get_entries() instead of self.entries.

get_entries()[source]

Get entries.

get_flags(filter_func=None)[source]

Get flags.

json_data

JSON data property.

messages

Message.

perform_autocomplete(form, name, term, limit=50)[source]

Run auto-complete method for field.

This method should not be called directly, instead use Form.autocomplete().

post_process(form=None, formfields=[], extra_processors=[], submit=False)[source]

Run post process on each subfield.

Run post process on each subfield as well as extra processors defined on form.

process(*args, **kwargs)[source]

Process.

reset_field_data(exclude=[])[source]

Reset the fields.data value to that of field.object_data.

Usually not called directly, but rather through Form.reset_field_data()

Parameters:exclude – List of formfield names to exclude.
set_flags(flags)[source]

Set flags.

validate(form, extra_validators=())[source]

Adapted to use self.get_entries() instead of self.entries.

class inspirehep.modules.forms.fields.wtformsext.DynamicFieldList(*args, **kwargs)[source]

Bases: inspirehep.modules.forms.fields.wtformsext.FieldList

Encapsulate an ordered list of multiple instances of the same field type.

Encapsulate an ordered list of multiple instances of the same field type, keeping data as a list.

Extends WTForm FieldList field to allow dynamic add/remove of enclosed fields.

bound_field(idx, force=False)[source]

Create a bound subfield for this list.

get_entries()[source]

Filter out empty index entry.

process(formdata, data=<unset value>)[source]

Adapted from wtforms.FieldList.

Adapted from wtforms.FieldList to allow merging content formdata and draft data properly.

class inspirehep.modules.forms.fields.wtformsext.BooleanField(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.BooleanField

class inspirehep.modules.forms.fields.wtformsext.DateField(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.DateField

class inspirehep.modules.forms.fields.wtformsext.DateTimeField(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.DateTimeField

class inspirehep.modules.forms.fields.wtformsext.DecimalField(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.DecimalField

class inspirehep.modules.forms.fields.wtformsext.Field(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.Field

class inspirehep.modules.forms.fields.wtformsext.FieldList(*args, **kwargs)[source]

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.FieldList

Deposition field list.

bound_field(idx)[source]

Create a bound field for index.

data

Adapted to use self.get_entries() instead of self.entries.

get_entries()[source]

Get entries.

get_flags(filter_func=None)[source]

Get flags.

json_data

JSON data property.

messages

Message.

perform_autocomplete(form, name, term, limit=50)[source]

Run auto-complete method for field.

This method should not be called directly, instead use Form.autocomplete().

post_process(form=None, formfields=[], extra_processors=[], submit=False)[source]

Run post process on each subfield.

Run post process on each subfield as well as extra processors defined on form.

process(*args, **kwargs)[source]

Process.

reset_field_data(exclude=[])[source]

Reset the fields.data value to that of field.object_data.

Usually not called directly, but rather through Form.reset_field_data()

Parameters:exclude – List of formfield names to exclude.
set_flags(flags)[source]

Set flags.

validate(form, extra_validators=())[source]

Adapted to use self.get_entries() instead of self.entries.

class inspirehep.modules.forms.fields.wtformsext.FileField(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.simple.FileField

class inspirehep.modules.forms.fields.wtformsext.FloatField(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.FloatField

class inspirehep.modules.forms.fields.wtformsext.FormField(*args, **kwargs)[source]

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.FormField

Deposition form field.

flags

Get flags in form of a proxy.

This proxy accumulats flags stored in this object and all children fields.

get_flags(filter_func=None)[source]

Get flags.

json_data

JSON data property.

messages

Message property.

perform_autocomplete(form, name, term, limit=50)[source]

Run auto-complete method for field.

This method should not be called directly, instead use Form.autocomplete().

post_process(form=None, formfields=[], extra_processors=[], submit=False)[source]

Run post process on each subfield.

Run post process on each subfield as well as extra processors defined on form.

process(formdata, data=<unset value>)[source]

Preprocess formdata in case we are passed a JSON data structure.

reset_field_data(exclude=[])[source]

Reset the fields.data value to that of field.object_data.

Usually not called directly, but rather through Form.reset_field_data().

Parameters:exclude – List of formfield names to exclude.
set_flags(flags)[source]

Set flags.

class inspirehep.modules.forms.fields.wtformsext.HiddenField(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.simple.HiddenField

class inspirehep.modules.forms.fields.wtformsext.IntegerField(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.IntegerField

class inspirehep.modules.forms.fields.wtformsext.MultipleFileField(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.simple.MultipleFileField

class inspirehep.modules.forms.fields.wtformsext.PasswordField(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.simple.PasswordField

class inspirehep.modules.forms.fields.wtformsext.RadioField(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.RadioField

class inspirehep.modules.forms.fields.wtformsext.SelectField(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.SelectField

class inspirehep.modules.forms.fields.wtformsext.SelectFieldBase(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.SelectFieldBase

class inspirehep.modules.forms.fields.wtformsext.SelectMultipleField(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.SelectMultipleField

class inspirehep.modules.forms.fields.wtformsext.StringField(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.StringField

class inspirehep.modules.forms.fields.wtformsext.SubmitField(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.simple.SubmitField

class inspirehep.modules.forms.fields.wtformsext.TextAreaField(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.simple.TextAreaField

class inspirehep.modules.forms.fields.wtformsext.TextField(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.simple.TextField

class inspirehep.modules.forms.fields.wtformsext.TimeField(*args, **kwargs)

Bases: inspirehep.modules.forms.field_base.INSPIREField, wtforms.fields.core.TimeField

Module contents

Init.