def report_view(title, form_type=None):
<EOL>def _report(view):<EOL><INDENT>report_view = ReportView(view, title, form_type)<EOL>report_view = user_passes_test(views._staff_only)(report_view)<EOL>report_view = wraps(view)(report_view)<EOL>_all_report_views.append(report_view)<EOL>return report_view<EOL><DEDENT>return _report<EOL>
Decorator that converts a report view function into something that
    displays a Report.

    Arguments:
        title (str):
            The title of the report.
        form_type (Optional[forms.Form]):
            A form class that can make this report display things. If not
            supplied, no form will be displayed.