hawat.blueprints.auth_dev.forms module

This module contains custom developer login form for Hawat.

class hawat.blueprints.auth_dev.forms.LoginForm(*args, **kwargs)[source]

Bases: flask_wtf.form.FlaskForm

Class representing developer authentication login form. This form provides list of all currently existing user accounts in simple selectbox, so that the developer can quickly login as different user.

cancel = <UnboundField(SubmitField, (l'Cancel',), {})>
login = <UnboundField(SelectField, (l'User account:',), {'validators': [<wtforms.validators.DataRequired object>]})>
set_choices()[source]

Load list of all user accounts and populate the choices attribute of the login selectbox.

submit = <UnboundField(SubmitField, (l'Login',), {})>
class hawat.blueprints.auth_dev.forms.RegisterUserAccountForm(*args, **kwargs)[source]

Bases: hawat.blueprints.users.forms.BaseUserAccountForm

Class representing user account registration form.

justification = <UnboundField(TextAreaField, (l'Justification:',), {'validators': [<wtforms.validators.DataRequired object>, <wtforms.validators.Length object>]})>
login = <UnboundField(StringField, (l'Login:',), {'validators': [<wtforms.validators.DataRequired object>, <wtforms.validators.Length object>, <function check_login>, <function check_id_existence>]})>
memberships_wanted = <UnboundField(QuerySelectMultipleField, (l'Requested group memberships:',), {'query_factory': <function get_available_groups>, 'allow_blank': True})>
hawat.blueprints.auth_dev.forms.get_available_groups()[source]

Query the database for list of all available groups.