aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/caf
diff options
context:
space:
mode:
authorMR Lemon <matt@matthewlemon>2020-04-21 17:05:29 +0100
committerMR Lemon <matt@matthewlemon>2020-04-21 17:05:29 +0100
commit52cc134d93bea4ea8a2809ab9bf0298dccc771e4 (patch)
tree4b6a7fb537d86e8adb881fadbac4c483b5bf8392 /ctrack/caf
parent4d09daf0de083407b57be6d8bee9bcb6b6f1bcc9 (diff)
added a couple of decorators missed off some view funcs
Diffstat (limited to 'ctrack/caf')
-rw-r--r--ctrack/caf/views.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ctrack/caf/views.py b/ctrack/caf/views.py
index 251024d..5308421 100644
--- a/ctrack/caf/views.py
+++ b/ctrack/caf/views.py
@@ -1,3 +1,4 @@
+from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import HttpResponseRedirect
from django.shortcuts import render
@@ -15,6 +16,7 @@ class ListCAF(LoginRequiredMixin, ListView):
# Let's write a traditional function view!
+@login_required()
def caf_detail_view(request, pk):
caf = CAF.objects.get(pk=pk)
# get any assessments that have been done on this caf
@@ -55,6 +57,7 @@ class ApplicableSystemDetail(LoginRequiredMixin, DetailView):
template_name = "caf/applicablesystem_detail.html"
+@login_required
def applicable_system_create_from_caf(request, caf_id):
org_id = CAF.objects.get(pk=caf_id).organisation().id
if request.method=="POST":