diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2018-02-13 21:40:48 -0500 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2018-02-13 21:40:48 -0500 |
| commit | 49f9df9b774b48ceef6f3a99f7a6f4912730dc5f (patch) | |
| tree | 5014e304fa69c0d48ae842780c488440314f0576 /app/dispatch/views.py | |
| parent | 1d5d056670d9d63d27d6363de4563435d5ff4cdb (diff) | |
| download | dispatch-tracker-49f9df9b774b48ceef6f3a99f7a6f4912730dc5f.tar.gz dispatch-tracker-49f9df9b774b48ceef6f3a99f7a6f4912730dc5f.tar.xz | |
Add logging for Invoices, User Invoice Number, and Identity. Added template to show audit logs as well as a view
Diffstat (limited to 'app/dispatch/views.py')
| -rw-r--r-- | app/dispatch/views.py | 9 |
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 |
