diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-20 12:13:58 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-20 12:13:58 +0100 |
commit | 5f5a6598c43f7df744c0a9127dced97103136cfe (patch) | |
tree | ece77c95fc51f2cefca3e81fbcbfb79aba551e2d | |
parent | 29b6b17e35730b3d2afd6ba17e3524f3f9b69c10 (diff) |
added list of inspector names to home page
-rw-r--r-- | ctrack/core/views.py | 3 | ||||
-rw-r--r-- | ctrack/templates/pages/home.html | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/ctrack/core/views.py b/ctrack/core/views.py index 6482662..254fb86 100644 --- a/ctrack/core/views.py +++ b/ctrack/core/views.py @@ -1,3 +1,4 @@ +from django.contrib.auth import get_user_model from django.contrib.auth.decorators import login_required from django.shortcuts import render @@ -26,6 +27,7 @@ def home_page(request): }, ) else: + caf_users = get_user_model().objects.all() no_orgs = Organisation.objects.count() no_people = Person.objects.count() no_cafs = CAF.objects.count() @@ -37,5 +39,6 @@ def home_page(request): "no_cafs": no_cafs, "no_essential_services": no_essential_services, "no_systems": no_systems, + "caf_users": caf_users, } return render(request, "pages/home.html", context) diff --git a/ctrack/templates/pages/home.html b/ctrack/templates/pages/home.html index 1a5a64d..9ef16ac 100644 --- a/ctrack/templates/pages/home.html +++ b/ctrack/templates/pages/home.html @@ -91,8 +91,9 @@ Inspectors </h3> <ul class="list-group"> - <li class="list-group-item">Name</li> - <li class="list-group-item">Name</li> + {% for user in caf_users %} + <li class="list-group-item list-group-item-dark">{{ user.name }}</li> + {% endfor %} </ul> </div> </div> |