diff --git a/registrasion/reporting/reports.py b/registrasion/reporting/reports.py index f8339a5d..e756622e 100644 --- a/registrasion/reporting/reports.py +++ b/registrasion/reporting/reports.py @@ -13,6 +13,7 @@ _all_report_views = [] class Report(object): def __init__(self, title, headings, data, link_view=None): + self._title = title self._headings = headings self._data = data self._link_view = link_view @@ -66,12 +67,15 @@ def report_view(title, form_type=None): else: form = None - report = view(request, form, *a, **k) + reports = view(request, form, *a, **k) + + if isinstance(reports, Report): + reports = [reports] ctx = { "title": title, "form": form, - "report": report, + "reports": reports, } return render(request, "registrasion/report.html", ctx) diff --git a/registrasion/urls.py b/registrasion/urls.py index b6b120c1..5c304091 100644 --- a/registrasion/urls.py +++ b/registrasion/urls.py @@ -37,6 +37,8 @@ public = [ reports = [ url(r"^$", reporting_views.reports_list, name="reports_list"), + url(r"^attendee/?$", reporting_views.attendee, name="attendee"), + url(r"^attendee/([0-9]*)$", reporting_views.attendee, name="attendee"), url( r"^credit_notes/?$", reporting_views.credit_notes,