Indico fields

Todo

Docstrings to all fields

Indico fields extend from WTForm fields and are used for the special cases where the simple form fields are not enough to cover all needs.

class indico.modules.events.fields.EventPersonLinkListField(*args, **kwargs)

A field to manage event’s chairpersons.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

linked_object_attr = 'event'

name of the attribute on the form containing the linked object

alias of EventPersonLink

pre_validate(form)

Override if you need field-level validation. Runs before any other validators.

Parameters:

form – The form the field belongs to.

property roles
widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.modules.events.fields.IndicoThemeSelectField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

class indico.modules.events.fields.PersonLinkListFieldBase(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

property can_enter_manually
create_untrusted_persons = False
property default_search_external
default_sort_alpha = True

If set to True, will be sorted alphabetically by default

property event
property extra_params
property has_predefined_affiliations
linked_object_attr = None

name of the attribute on the form containing the linked object

property name_format

class that inherits from PersonLinkBase

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

property validate_email_url
widget = None
class indico.modules.events.fields.RatingReviewField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.modules.events.fields.ReferencesField(*args, **kwargs)

A field to manage external references.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

pre_validate(form)

Override if you need field-level validation. Runs before any other validators.

Parameters:

form – The form the field belongs to.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

class indico.modules.events.abstracts.fields.AbstractField(*args, **kwargs)

A field with dynamic fetching to select an abstract from an event.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

property event
pre_validate(form)

Override if you need field-level validation. Runs before any other validators.

Parameters:

form – The form the field belongs to.

property search_payload
property search_url
widget = <indico.web.forms.widgets.DropdownWidget object>
class indico.modules.events.abstracts.fields.AbstractPersonLinkListField(*args, **kwargs)

A field to configure a list of abstract persons.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

create_untrusted_persons = True
default_sort_alpha = False

If set to True, will be sorted alphabetically by default

linked_object_attr = 'abstract'

name of the attribute on the form containing the linked object

alias of AbstractPersonLink

pre_validate(form)

Override if you need field-level validation. Runs before any other validators.

Parameters:

form – The form the field belongs to.

property roles
widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.modules.events.abstracts.fields.EmailRuleListField(*args, **kwargs)

A field that stores a list of e-mail template rules.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

CAN_POPULATE = True

Whether an object may be populated with the data from this field

accepted_condition_types = (<class 'indico.modules.events.abstracts.notifications.StateCondition'>, <class 'indico.modules.events.abstracts.notifications.TrackCondition'>, <class 'indico.modules.events.abstracts.notifications.ContributionTypeCondition'>)
property condition_choices
condition_class_map = {'contribution_type': <class 'indico.modules.events.abstracts.notifications.ContributionTypeCondition'>, 'state': <class 'indico.modules.events.abstracts.notifications.StateCondition'>, 'track': <class 'indico.modules.events.abstracts.notifications.TrackCondition'>}
pre_validate(form)

Override if you need field-level validation. Runs before any other validators.

Parameters:

form – The form the field belongs to.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.modules.events.abstracts.fields.TrackRoleField(*args, **kwargs)

A field to assign track roles to principals.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

CAN_POPULATE = True

Whether an object may be populated with the data from this field

property category_roles
property event_roles
property permissions_info
widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.modules.events.contributions.fields.ContributionPersonLinkListField(*args, **kwargs)

A field to configure a list of contribution persons.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

linked_object_attr = 'contrib'

name of the attribute on the form containing the linked object

alias of ContributionPersonLink

pre_validate(form)

Override if you need field-level validation. Runs before any other validators.

Parameters:

form – The form the field belongs to.

property roles
widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.modules.events.contributions.fields.SubContributionPersonLinkListField(*args, **kwargs)

A field to configure a list of subcontribution persons.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

linked_object_attr = 'subcontrib'

name of the attribute on the form containing the linked object

alias of SubContributionPersonLink

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.modules.events.papers.fields.PaperEmailSettingsField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

CAN_POPULATE = True

Whether an object may be populated with the data from this field

property event
process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.modules.events.sessions.fields.SessionBlockPersonLinkListField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

linked_object_attr = 'session_block'

name of the attribute on the form containing the linked object

alias of SessionBlockPersonLink

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.modules.categories.fields.CategoryField(*args, **kwargs)

WTForms field that lets you select a category.

Parameters:
  • require_event_creation_rights – Whether to allow selecting only categories where the user can create events.

  • require_category_management_rights – Whether to allow selecting only categories where the user has management rights.

  • show_event_creation_warning – Whether to show warning messages related to event creation.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

process_data(value)

Process the Python data applied to this field and store the result.

This will be called during form construction by the form’s kwargs or obj argument.

Parameters:

value – The python object containing the value to process.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.modules.categories.fields.EventRequestList(category, **kwargs)
class indico.modules.networks.fields.MultiIPNetworkField(*args, **kwargs)

A field to enter multiple IPv4 or IPv6 networks.

The field data is a set of IPNetwork``s not bound to a DB session. The ``unique and sortable parameters of the parent class cannot be used with this class.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

pre_validate(form)

Override if you need field-level validation. Runs before any other validators.

Parameters:

form – The form the field belongs to.

process_data(value)

Process the Python data applied to this field and store the result.

This will be called during form construction by the form’s kwargs or obj argument.

Parameters:

value – The python object containing the value to process.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

class indico.web.forms.fields.AccessControlListField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

class indico.web.forms.fields.EditableFileField(*args, **kwargs)

A dropzone field that displays its current state and keeps track of deletes.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.EmailListField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

class indico.web.forms.fields.FileField(*args, **kwargs)

A dropzone field.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

default_options = {'add_remove_links': True, 'handle_flashes': False, 'lightweight': False, 'max_files': 10, 'multiple_files': False}
process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.HiddenEnumField(*args, **kwargs)

Hidden field that only accepts values from an Enum.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

class indico.web.forms.fields.HiddenFieldList(*args, **kwargs)

A hidden field that handles lists of strings.

This is done getlist-style, i.e. by repeating the input element with the same name for each list item.

The only case where this field is useful is when you display a form via POST and provide a list of items (e.g. ids) related to the form which needs to be kept when the form is submitted and also need to access it via request.form.getlist(...) before submitting the form.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

widget = <indico.web.forms.widgets.HiddenInputs object>
class indico.web.forms.fields.IndicoDateField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

property earliest_date
property latest_date
property linked_date_validator
property linked_field
widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.IndicoDateTimeField(*args, **kwargs)

Friendly datetime field that handles timezones and validations.

Important: When the form has a timezone field it must be declared before any IndicoDateTimeField. Otherwise its value is not available in this field resulting in an error during form submission.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

property earliest_dt
property latest_dt
property linked_datetime_validator
property linked_field
pre_validate(form)

Override if you need field-level validation. Runs before any other validators.

Parameters:

form – The form the field belongs to.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

property timezone
property timezone_field
property tzinfo
widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.IndicoEmailRecipientsField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

process_data(data)

Process the Python data applied to this field and store the result.

This will be called during form construction by the form’s kwargs or obj argument.

Parameters:

value – The python object containing the value to process.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.IndicoEnumRadioField(*args, **kwargs)
option_widget = <wtforms.widgets.core.RadioInput object>

Base class for fields which can be iterated to produce options.

This isn’t a field, but an abstract base class for fields which want to provide this functionality.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.IndicoEnumSelectField(*args, **kwargs)

Select field backed by a RichEnum.

iter_choices()

Provides data for choice widget rendering. Must return a sequence or iterable of (value, label, selected, render_kw) tuples.

widget = <wtforms.widgets.core.Select object>
class indico.web.forms.fields.IndicoLocationField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

CAN_POPULATE = True

Whether an object may be populated with the data from this field

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

widget = <indico.web.forms.widgets.LocationWidget object>
class indico.web.forms.fields.IndicoMarkdownField(*args, **kwargs)

A Markdown-enhanced textarea.

When using the editor you need to include the markdown JS/CSS bundles and also the MathJax JS bundle (even when using only the editor without Mathjax).

Parameters:
  • editor – Whether to use the WMD widget with its live preview

  • mathjax – Whether to use MathJax in the WMD live preview

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.IndicoPalettePickerField(*args, **kwargs)

Field allowing user to pick a color from a set of predefined values.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

CAN_POPULATE = True

Whether an object may be populated with the data from this field

pre_validate(form)

Override if you need field-level validation. Runs before any other validators.

Parameters:

form – The form the field belongs to.

process_data(value)

Process the Python data applied to this field and store the result.

This will be called during form construction by the form’s kwargs or obj argument.

Parameters:

value – The python object containing the value to process.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.IndicoPasswordField(*args, **kwargs)

Password field which can show or hide the password.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

widget = <indico.web.forms.widgets.PasswordWidget object>
class indico.web.forms.fields.IndicoProtectionField(*args, **kwargs)
radio_widget = <indico.web.forms.widgets.JinjaWidget object>
render_protection_message()
widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.IndicoQuerySelectMultipleCheckboxField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

option_widget = <wtforms.widgets.core.CheckboxInput object>

Base class for fields which can be iterated to produce options.

This isn’t a field, but an abstract base class for fields which want to provide this functionality.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.IndicoQuerySelectMultipleField(*args, **kwargs)

Like the parent, but with a callback that allows you to modify the list.

The callback can return a new list or yield items, and you can use it e.g. to sort the list.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

property data
class indico.web.forms.fields.IndicoRadioField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.IndicoSelectMultipleCheckboxBooleanField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

iter_choices()

Provides data for choice widget rendering. Must return a sequence or iterable of (value, label, selected, render_kw) tuples.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

class indico.web.forms.fields.IndicoSelectMultipleCheckboxField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

option_widget = <wtforms.widgets.core.CheckboxInput object>

Base class for fields which can be iterated to produce options.

This isn’t a field, but an abstract base class for fields which want to provide this functionality.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.IndicoSinglePalettePickerField(*args, **kwargs)

Like IndicoPalettePickerField but for just a single color.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

pre_validate(form)

Override if you need field-level validation. Runs before any other validators.

Parameters:

form – The form the field belongs to.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

class indico.web.forms.fields.IndicoStaticTextField(*args, **kwargs)

Return an html element with text taken from this field’s value.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

process_data(data)

Process the Python data applied to this field and store the result.

This will be called during form construction by the form’s kwargs or obj argument.

Parameters:

value – The python object containing the value to process.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.IndicoStrictKeywordsField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

widget = <indico.web.forms.widgets.DropdownWidget object>
class indico.web.forms.fields.IndicoTagListField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.IndicoTimeField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.IndicoTimezoneSelectField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

process_data(value)

Process the Python data applied to this field and store the result.

This will be called during form construction by the form’s kwargs or obj argument.

Parameters:

value – The python object containing the value to process.

class indico.web.forms.fields.IndicoWeekDayRepetitionField(*args, **kwargs)

Field that lets you select an ordinal day of the week.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

WEEK_DAY_NUMBER_CHOICES = ((1, l'first'), (2, l'second'), (3, l'third'), (4, l'fourth'), (-1, l'last'))
property day_number_data
process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

property week_day_data
widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.JSONField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

CAN_POPULATE = False

Whether an object may be populated with the data from this field

populate_obj(obj, name)

Populates obj.<name> with the field’s data.

Note:

This is a destructive operation. If obj.<name> already exists, it will be overridden. Use with caution.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

class indico.web.forms.fields.MultiStringField(*args, **kwargs)

A field with multiple input text fields.

Parameters:
  • field – A tuple (fieldname, title) where the title is used in the placeholder.

  • uuid_field – If set, each item will have a UUID assigned and stored in the field specified here.

  • flat – If True, the field returns a list of string values instead of dicts. Cannot be combined with uuid_field.

  • unique – Whether the values should be unique.

  • sortable – Whether items should be sortable.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

pre_validate(form)

Override if you need field-level validation. Runs before any other validators.

Parameters:

form – The form the field belongs to.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.MultipleItemsField(*args, **kwargs)

A field with multiple items consisting of multiple string values.

Parameters:
  • fields

    A list of dicts with the following arguments: ‘id’: the unique ID of the field ‘caption’: the title of the column and the placeholder ‘type’: ‘text|number|select’, the type of the field ‘coerce’: callable to convert the value to a python type.

    the type must be comvertible back to a string, so usually you just want something like int or float here.

    In case the type is ‘select’, the property ‘choices’ of the MultipleItemsField or the ‘choices’ kwarg needs to be a dict where the key is the ‘id’ of the select field and the value is another dict mapping the option’s id to it caption.

  • uuid_field – If set, each item will have a UUID assigned and stored in the field specified here. The name specified here may not be in fields.

  • uuid_field_opaque – If set, the uuid_field is considered opaque, i.e. it is never touched by this field. This is useful when you subclass the field and use e.g. actual database IDs instead of UUIDs.

  • unique_field – The name of a field in fields that needs to be unique.

  • sortable – Whether items should be sortable.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

pre_validate(form)

Override if you need field-level validation. Runs before any other validators.

Parameters:

form – The form the field belongs to.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.OccurrencesField(*args, **kwargs)

A field that lets you select multiple occurrences consisting of a start date/time and a duration.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

CAN_POPULATE = True

Whether an object may be populated with the data from this field

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

property timezone
property timezone_field
widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.OverrideMultipleItemsField(*args, **kwargs)

A field similar to MultipleItemsField which allows the user to override some values.

Parameters:
  • fields – a list of (fieldname, title) tuples. Should match the fields of the corresponding MultipleItemsField.

  • field_data – the data from the corresponding MultipleItemsField.

  • unique_field – the name of the field which is unique among all rows

  • edit_fields – a set containing the field names which can be edited

If you decide to use this field, please consider adding support for uuid_field here!

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

get_overridden_value(row, name)

Utility for the widget to get the entered value for an editable field.

get_row_key(row)

Utility for the widget to get the unique value for a row.

pre_validate(form)

Override if you need field-level validation. Runs before any other validators.

Parameters:

form – The form the field belongs to.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.PrincipalField(*args, **kwargs)

A field that lets you select a single Indico user.

Parameters:

allow_external_users – If “search users with no indico account” should be available. Selecting such a user will automatically create a pending user once the form is submitted, even if other fields in the form fail to validate!

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.PrincipalListField(*args, **kwargs)

A field that lets you select a list of principals.

Principals are users or other objects represending users such as groups or roles that can be added to ACLs.

Parameters:
  • allow_external_users – If “search users with no indico account” should be available. Selecting such a user will automatically create a pending user once the form is submitted, even if other fields in the form fail to validate!

  • allow_groups – If groups should be selectable.

  • allow_event_roles – If event roles should be selectable.

  • allow_category_roles – If category roles should be selectable.

  • allow_registration_forms – If registration form associated to an event should be selectable.

  • allow_emails – If the field should allow bare emails. Those are not selectable in the widget, but may be added to an ACL through other means.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.RelativeDeltaField(*args, **kwargs)

A field that lets the user select a simple timedelta.

It does not support mixing multiple units, but it is smart enough to switch to a different unit to represent a timedelta that could not be represented otherwise.

Parameters:

units – The available units. Must be a tuple containing any any of ‘seconds’, ‘minutes’, ‘hours’ and ‘days’. If not specified, ('hours', 'days') is assumed.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

property choices
magnitudes = {'days': relativedelta(days=+1), 'hours': relativedelta(hours=+1), 'minutes': relativedelta(minutes=+1), 'months': relativedelta(months=+1), 'seconds': relativedelta(seconds=+1), 'weeks': relativedelta(days=+7), 'years': relativedelta(years=+1)}
pre_validate(form)

Override if you need field-level validation. Runs before any other validators.

Parameters:

form – The form the field belongs to.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

property split_data
unit_names = {'days': 'Days', 'hours': 'Hours', 'minutes': 'Minutes', 'months': 'Months', 'seconds': 'Seconds', 'weeks': 'Weeks', 'years': 'Years'}
widget = <indico.web.forms.widgets.JinjaWidget object>
class indico.web.forms.fields.TextListField(*args, **kwargs)

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

pre_validate(form)

Override if you need field-level validation. Runs before any other validators.

Parameters:

form – The form the field belongs to.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

class indico.web.forms.fields.TimeDeltaField(*args, **kwargs)

A field that lets the user select a simple timedelta.

It does not support mixing multiple units, but it is smart enough to switch to a different unit to represent a timedelta that could not be represented otherwise.

Parameters:

units – The available units. Must be a tuple containing any any of ‘seconds’, ‘minutes’, ‘hours’, ‘days’ and ‘weeks’. If not specified, ('hours', 'days') is assumed.

Construct a new field.

Parameters:
  • label – The label of the field.

  • validators – A sequence of validators to call when validate is called.

  • filters – A sequence of callable which are run by process() to filter or transform the input data. For example StringForm(filters=[str.strip, str.upper]). Note that filters are applied after processing the default and incoming data, but before validation.

  • description – A description for the field, typically used for help text.

  • id – An id to use for the field. A reasonable default is set by the form, and you shouldn’t need to set this manually.

  • default – The default value to assign to the field, if no form or object input is provided. May be a callable.

  • widget – If provided, overrides the widget used to render the field.

  • render_kw (dict) – If provided, a dictionary which provides default keywords that will be given to the widget at render time.

  • name – The HTML name of this field. The default value is the Python attribute name.

  • _form – The form holding this field. It is passed by the form itself during construction. You should never pass this value yourself.

  • _prefix – The prefix to prepend to the form name of this field, passed by the enclosing form during construction.

  • _translations – A translations object providing message translations. Usually passed by the enclosing form during construction. See I18n docs for information on message translations.

  • _meta – If provided, this is the ‘meta’ instance from the form. You usually don’t pass this yourself.

If _form isn’t provided, an UnboundField will be returned instead. Call its bind() method with a form instance and a name to construct the field.

property best_unit

Return the largest unit that covers the current timedelta.

property choices
magnitudes = {'days': 86400, 'hours': 3600, 'minutes': 60, 'seconds': 1, 'weeks': 604800}
pre_validate(form)

Override if you need field-level validation. Runs before any other validators.

Parameters:

form – The form the field belongs to.

process_formdata(valuelist)

Process data received over the wire from a form.

This will be called during form construction with data supplied through the formdata argument.

Parameters:

valuelist – A list of strings to process.

unit_names = {'days': 'Days', 'hours': 'Hours', 'minutes': 'Minutes', 'seconds': 'Seconds', 'weeks': 'Weeks'}
widget = <indico.web.forms.widgets.JinjaWidget object>