diff options
Diffstat (limited to '')
-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") |