aboutsummaryrefslogtreecommitdiff
path: root/app/dispatch/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/dispatch/views.py')
-rw-r--r--app/dispatch/views.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/dispatch/views.py b/app/dispatch/views.py
index 2aa82f5..f4e9a92 100644
--- a/app/dispatch/views.py
+++ b/app/dispatch/views.py
@@ -1,6 +1,7 @@
from django.shortcuts import render, redirect
from django.http import HttpResponse
from django.utils.encoding import smart_str
+from auditlog.models import LogEntry
# from django.template import loader
from django.core.urlresolvers import reverse
# import django.contrib.auth as auth
@@ -177,6 +178,14 @@ class DriverSummary(UserPassesTestMixin, LoadDateSort):
return context
+class AuditLog(UserPassesTestMixin, ListView):
+ template_name = "dispatch/log/summary.html"
+ model = LogEntry
+
+ def test_func(self):
+ return self.request.user.is_superuser
+
+
class DriverUpdate(UserPassesTestMixin, UpdateView):
template_name = "dispatch/drivers/edit.html"
model = User