aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/core/views.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-20 11:08:41 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-20 11:08:41 +0100
commite627ee10c73b0662f97619d4cda289a90a1aed38 (patch)
tree467596b077bc9cdadc3e16a1066d255737bfc1cf /ctrack/core/views.py
parentd210853a13aa3468f78dbfc3212f3930771498bf (diff)
more home page tweaking
Diffstat (limited to 'ctrack/core/views.py')
-rw-r--r--ctrack/core/views.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/ctrack/core/views.py b/ctrack/core/views.py
index a40f945..6482662 100644
--- a/ctrack/core/views.py
+++ b/ctrack/core/views.py
@@ -1,7 +1,8 @@
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
-from ctrack.organisations.models import IncidentReport, Organisation
+from ctrack.caf.models import EssentialService, CAF, ApplicableSystem
+from ctrack.organisations.models import IncidentReport, Organisation, Person
from ctrack.register.models import EngagementEvent
@@ -25,4 +26,16 @@ def home_page(request):
},
)
else:
- return render(request, "pages/home.html")
+ no_orgs = Organisation.objects.count()
+ no_people = Person.objects.count()
+ no_cafs = CAF.objects.count()
+ no_essential_services = EssentialService.objects.count()
+ no_systems = ApplicableSystem.objects.count()
+ context = {
+ "no_orgs": no_orgs,
+ "no_people": no_people,
+ "no_cafs": no_cafs,
+ "no_essential_services": no_essential_services,
+ "no_systems": no_systems,
+ }
+ return render(request, "pages/home.html", context)