From f0730b4de9fa32fc43d2cec9f2fd1548036d77cf Mon Sep 17 00:00:00 2001 From: Christopher Neugebauer Date: Tue, 13 Sep 2016 18:54:28 +1000 Subject: [PATCH] Flake8 fixes for reports --- registrasion/reporting/forms.py | 1 + registrasion/reporting/reports.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/registrasion/reporting/forms.py b/registrasion/reporting/forms.py index f4902660..94e99491 100644 --- a/registrasion/reporting/forms.py +++ b/registrasion/reporting/forms.py @@ -4,6 +4,7 @@ from django import forms # Staff-facing forms. + class ProductAndCategoryForm(forms.Form): product = forms.ModelMultipleChoiceField( queryset=inventory.Product.objects.all(), diff --git a/registrasion/reporting/reports.py b/registrasion/reporting/reports.py index 9ba63f06..ab8e924d 100644 --- a/registrasion/reporting/reports.py +++ b/registrasion/reporting/reports.py @@ -120,7 +120,9 @@ class QuerysetReport(BasicReport): def __init__(self, title, attributes, queryset, headings=None, link_view=None): - super(QuerysetReport, self).__init__(title, headings, link_view=link_view) + super(QuerysetReport, self).__init__( + title, headings, link_view=link_view + ) self._attributes = attributes self._queryset = queryset @@ -178,6 +180,7 @@ class Links(Report): self._linked_text(content_type, url, link_text) ] + def report_view(title, form_type=None): ''' Decorator that converts a report view function into something that displays a Report.