diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-06-01 16:50:43 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-06-01 16:50:43 +0100 |
commit | 2a476e7f27b08a9a2543222c44066fa4c09e02d9 (patch) | |
tree | cc0b3b19b75d7080236ee85a673a9e23e80fecb8 /ctrack/core | |
parent | 37a5818eb76ad75055807d300d1cdd6fb5821b0a (diff) |
added engagement events table to stakeholder home page
Diffstat (limited to 'ctrack/core')
-rw-r--r-- | ctrack/core/views.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ctrack/core/views.py b/ctrack/core/views.py index c9465f1..5f5627c 100644 --- a/ctrack/core/views.py +++ b/ctrack/core/views.py @@ -2,6 +2,7 @@ from django.contrib.auth.decorators import login_required from django.shortcuts import render from ctrack.organisations.models import IncidentReport, Organisation +from ctrack.register.models import EngagementEvent @login_required @@ -12,10 +13,17 @@ def home_page(request): ) irs = IncidentReport.objects.filter(organisation__name=org) systems = org.applicablesystem_set.all() + peoples = org.person_set.all() + engagement_events = EngagementEvent.objects.filter(participants__in=peoples) return render( request, "pages/stakeholder_home.html", - context={"org": org, "systems": systems, "irs": irs}, + context={ + "org": org, + "systems": systems, + "irs": irs, + "engagement_events": engagement_events, + }, ) else: return render(request, "pages/home.html") |