aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations/views.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-09-04 16:14:59 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-09-04 16:14:59 +0100
commit8e843075adc31359703838e23e53b17ffa8e9f9c (patch)
treeb5504c70f0076d3bf53dc47991c0a690e4942ed3 /ctrack/organisations/views.py
parent959c001905fffc4840e8f795170d724474bc1997 (diff)
linking up essential service, ass and org detail html
Diffstat (limited to 'ctrack/organisations/views.py')
-rw-r--r--ctrack/organisations/views.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/ctrack/organisations/views.py b/ctrack/organisations/views.py
index 7652783..eb264ca 100644
--- a/ctrack/organisations/views.py
+++ b/ctrack/organisations/views.py
@@ -1,6 +1,7 @@
from typing import Any, Dict
from django.contrib.auth.mixins import LoginRequiredMixin, PermissionRequiredMixin
+from django.shortcuts import render, get_object_or_404
from django.db import transaction
from django.http import HttpResponseRedirect
from django.urls import reverse, reverse_lazy
@@ -12,6 +13,14 @@ from .forms import AddressInlineFormSet, IncidentReportForm, OrganisationCreateF
from .models import IncidentReport, Organisation, Person
from ctrack.caf.models import EssentialService
+# TODO - needs a permission on this view
+def essential_service_detail(request, pk):
+ es = EssentialService.objects.get(pk=pk)
+ asses = es.systems.all()
+ # es = get_object_or_404(EssentialService, organisation__pk=org_pk)
+ context = {"es": es, "asses": asses}
+ return render(request, "organisations/essential_service_detail.html", context)
+
class PersonListView(LoginRequiredMixin, PermissionRequiredMixin, ListView):
model = Person