hawat.blueprints.networks.forms module¶
This module contains custom network record management forms for Hawat.
-
class
hawat.blueprints.networks.forms.
AdminNetworkForm
(*args, **kwargs)[source]¶ Bases:
hawat.blueprints.networks.forms.BaseNetworkForm
Class representing network record create form.
-
group
= <UnboundField(QuerySelectField, (l'Group:',), {'query_factory': <function get_available_groups>, 'allow_blank': False})>¶
-
-
class
hawat.blueprints.networks.forms.
BaseNetworkForm
(*args, **kwargs)[source]¶ Bases:
hawat.forms.BaseItemForm
Class representing base network record form.
-
cancel
= <UnboundField(SubmitField, (l'Cancel',), {})>¶
-
description
= <UnboundField(TextAreaField, (l'Description:',), {})>¶
-
netname
= <UnboundField(StringField, (l'Netname:',), {'validators': [<wtforms.validators.DataRequired object>, <wtforms.validators.Length object>, <function check_null_character>]})>¶
-
network
= <UnboundField(TextAreaField, (l'Network:',), {'validators': [<wtforms.validators.DataRequired object>, <function check_network_record>]})>¶
-
rank
= <UnboundField(IntegerField, (l'Rank:',), {'validators': [<wtforms.validators.Optional object>, <wtforms.validators.NumberRange object>]})>¶
-
source
= <UnboundField(HiddenField, (), {'default': 'manual', 'validators': [<wtforms.validators.DataRequired object>, <wtforms.validators.Length object>]})>¶
-
submit
= <UnboundField(SubmitField, (l'Submit',), {})>¶
-
-
class
hawat.blueprints.networks.forms.
NetworkSearchForm
(*args, **kwargs)[source]¶ Bases:
hawat.forms.BaseSearchForm
Class representing simple user search form.
-
dt_from
= <UnboundField(SmartDateTimeField, (l'Creation time from:',), {'validators': [<wtforms.validators.Optional object>], 'description': l'Lower time boundary for item creation time. Timestamp is expected to be in the format <code>YYYY-MM-DD hh:mm:ss</code> and in the timezone according to the user`s preferences.'})>¶
-
dt_to
= <UnboundField(SmartDateTimeField, (l'Creation time to:',), {'validators': [<wtforms.validators.Optional object>], 'description': l'Upper time boundary for item creation time. Timestamp is expected to be in the format <code>YYYY-MM-DD hh:mm:ss</code> and in the timezone according to the user`s preferences.'})>¶
-
group
= <UnboundField(QuerySelectField, (l'Group:',), {'query_factory': <function get_available_groups>, 'allow_blank': True})>¶
-
static
is_multivalue
(field_name)[source]¶ Check, if given form field is a multivalue field.
- Parameters
field_name (str) – Name of the form field.
- Returns
True
, if the field can contain multiple values,False
otherwise.- Return type
bool
-
search
= <UnboundField(StringField, (l'Netname, network, description:',), {'validators': [<wtforms.validators.Optional object>, <wtforms.validators.Length object>, <function check_null_character>], 'description': l'Network`s name, address or description. Search is performed even in the middle of the strings.'})>¶
-
sortby
= <UnboundField(SelectField, (l'Sort by:',), {'validators': [<wtforms.validators.Optional object>], 'choices': [('createtime.desc', l'by creation time descending'), ('createtime.asc', l'by creation time ascending'), ('netname.desc', l'by netname descending'), ('netname.asc', l'by netname ascending'), ('network.desc', l'by network descending'), ('network.asc', l'by network ascending')], 'default': 'netname.asc'})>¶
-
source
= <UnboundField(SelectField, (l'Record source:',), {'validators': [<wtforms.validators.Optional object>], 'default': ''})>¶
-