forms.py

About this file

The file defines different forms used to create FOIL requests. The various forms are listed in the "Documentation drawn from source code" section below.

The required fields are defined for each form.

Code Issues

  • Many classes are missing docstrings.

Code Check Report


app/request/forms.py:246:80: E711 comparison to None should be 'if cond is None:'
app/request/forms.py:252:79: E711 comparison to None should be 'if cond is None:'
app/request/forms.py:258:82: E711 comparison to None should be 'if cond is None:'
app/request/forms.py:348:48: E711 comparison to None should be 'if cond is None:'
app/request/forms.py:402:44: E711 comparison to None should be 'if cond is None:'
app/request/forms.py:409:44: E711 comparison to None should be 'if cond is None:'
                        

Documentation drawn from source code


.. module:: request.forms.

:synopsis: Defines forms used to create FOIL requests.


PublicUserRequestForm(Form):

Form for public users to create a new FOIL request.
For a public user, the required fields are:

# Request information
agency: agency selected for the request
title: name or title of the request
description: detailed description of the request


__init__(self):

AgencyUserRequestForm(Form):

Form for agency users to create a new FOIL request.
For an agency user, the required fields are:

# Request Information
agency: agency selected for the request
title: name or title of the request
description: detailed description of the request
request_date: date the request was made
method_received: format the request was received

# Personal Information
first_name: first name of the requester
last_name: last name of the requester

# Contact Information (at least one form on contact is required)
email: requester's email address
phone: requester's phone number
fax: requester's fax number
address, city, state, zip: requester's address

__init__(self):

AnonymousRequestForm(Form):

Form for anonymous users to create a new FOIL request.
For a anonymous user, the required fields are:

# Request Information
agency: agency selected for the request
title: name or title of the request
description: detailed description of the request

# Personal Information
first_name: first name of the requester
last_name: last name of the requester

# Contact Information (at least one form on contact is required)
email: requester's email address
phone: requester's phone number
fax: requester's fax number
address, city, state, zip: requester's address

__init__(self):

EditRequesterForm(Form):

__init__(self, requester):

:type requester: app.models.Users

DeterminationForm(Form):

__init__(self, agency_ein):

reasons(self):
SelectMultipleField or SelectField

ultimate_determination_type(self):
Closing or Denial

DenyRequestForm(DeterminationForm):

CloseRequestForm(DeterminationForm):

ReopenRequestForm(DeterminationForm):

GenerateEnvelopeForm(Form):

__init__(self, agency_ein, requester):

:type requester: app.models.Users

GenerateLetterForm(Form):

__init__(self, agency_ein):

letter_templates(self):
SelectField

letter_type(self):
Acknowledgement, Extension,

GenerateAcknowledgmentLetterForm(GenerateLetterForm):

GenerateDenialLetterForm(GenerateLetterForm):

GenerateClosingLetterForm(GenerateLetterForm):

__init__(self, agency_ein):

GenerateExtensionLetterForm(GenerateLetterForm):

GenerateReopeningLetterForm(GenerateLetterForm):

GenerateResponseLetterForm(GenerateLetterForm):

SearchRequestsForm(Form):

__init__(self):

ContactAgencyForm(Form):

__init__(self, request):

Source code