diff options
Diffstat (limited to '')
-rw-r--r-- | ctrack/caf/views.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ctrack/caf/views.py b/ctrack/caf/views.py index b95965b..d11fa8c 100644 --- a/ctrack/caf/views.py +++ b/ctrack/caf/views.py @@ -31,11 +31,18 @@ def caf_detail_view(request, pk): for ass in assessments: lst_scores = [ass, CAFAssessmentOutcomeScore.objects.filter(caf_assessment=ass)] _scrs.append(lst_scores) + events_related_to_caf = caf.get_events() + events = [] + for event in events_related_to_caf: + if not event.end_date: + events.append(dict(event=event, ended=False, badge_code="warning")) + context = { "object": caf, "assessments_and_scores": _scrs, "organisation": caf.organisation, "systems": caf.systems.all(), + "events": events } return render(request, "caf/caf_detail.html", context) |