forms.py

About this file

This file defines the forms used to manage Authentication requests.
It has classes to manage user/agent user account forms.
It has another class for basic login form with email, password and login button fields.

Code Check Report


app/auth/forms.py:13:1: F401 'app.models.Agencies' imported but unused
                        

Documentation drawn from source code



.. module:: auth.forms

:synopsis: Defines the forms used to manage Authentication requests


StripFieldsForm(Form):

Any field data that can be stripped, will be stripped.
http://stackoverflow.com/questions/26232165/automatically-strip-all-values-in-wtforms

Meta:

bind_field(self, form, unbound_field, options):

strip_filter(value):

ManageUserAccountForm(StripFieldsForm):

This form manages the OpenRecords specific account fields for a user account:
Title: The job title for the user (e.g. Reporter); This is optional
Organization: The company for the user (e.g. New York Times); This is optional
Notification Email: The email to send OpenRecords notifications to
Phone Number: The user's phone number; This is optional
Fax Number: The user's fax number: This is optional
Mailing Address: The user's mailing address; Optional;
Format: Address One, Address Two, City, State, Zip (5 Digits)

__init__(self, user=None):

:type user: app.models.Users

autofill(self):

validate(self):
One mthod of contact must be provided.

ManageAgencyUserAccountForm(StripFieldsForm):

This form manages the OpenRecords specific account fields for a user account:
Title: The job title for the user (e.g. Reporter); This is optional
Organization: The company for the user (e.g. New York Times); This is optional
Notification Email: The email to send OpenRecords notifications to
Phone Number: The user's phone number; This is optional
Fax Number: The user's fax number: This is optional
Mailing Address: The user's mailing address; Optional;
Format: Address One, Address Two, City, State, Zip (5 Digits)

__init__(self, user=None):

:type user: app.models.Users

autofill(self):

validate(self):
One mthod of contact must be provided.

BasicLoginForm(Form):

Source code