aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/caf/views.py
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2020-03-10 20:40:00 +0000
committerMatthew Lemon <matt@matthewlemon.com>2020-03-10 20:40:00 +0000
commit274b7642e9297baecfeb044e9fd20e3f50f04fc9 (patch)
treec6da3f566f76535206fbec42ade088a5bcffe332 /ctrack/caf/views.py
parentea1d48ab0a327ec9a2ce6f18989cd1ca5e1dbba5 (diff)
basic caf detail page implemented - BASIC
Diffstat (limited to '')
-rw-r--r--ctrack/caf/views.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/ctrack/caf/views.py b/ctrack/caf/views.py
index 5ded2dc..e4503e7 100644
--- a/ctrack/caf/views.py
+++ b/ctrack/caf/views.py
@@ -1,7 +1,7 @@
-from django.views.generic import CreateView, ListView
+from django.views.generic import CreateView, ListView, DetailView
from ctrack.caf.forms import CAFForm
-from ctrack.caf.models import ApplicableSystem
+from ctrack.caf.models import ApplicableSystem, CAF
class CreateCAF(CreateView):
@@ -18,6 +18,10 @@ class ListCAF(ListView):
pass
+class DetailCAF(DetailView):
+ model = CAF
+
+
class ListApplicableSystem(ListView):
model = ApplicableSystem
# apparently you can pass a list of model objects to a template if you name it
@@ -31,5 +35,3 @@ class ListApplicableSystem(ListView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
return context
-
-