forms.py
About this file
In this, Class ReportFilterForm() defines forms used for reporting statistics. And Class AcknowledgmentForm() generates reports with acknowledgment data.
Code Issues
-
The query in
class ReportFilterForm()should be explained at least in one line about what exactly is filtered and why iskey=lambda x: x[1]used to sortuser_agencies. There should be a comment about this.
(It's usage information can be found here.)
Code Check Report
No problems to report
Documentation drawn from source code
.. module:: report.forms.:synopsis: Defines forms used for report statistics.
ReportFilterForm(Form):Form for users to filter different report statistics.agency: agency selected to filter byuser: active agency user selected to filter by
__init__(self):AcknowledgmentForm(Form):Form to generate a report with acknowledgment data.
validate(self):MonthlyMetricsReportForm(Form):Form to generate a monthly metrics report.
__init__(self):