diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2020-03-10 20:40:00 +0000 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2020-03-10 20:40:00 +0000 |
commit | 274b7642e9297baecfeb044e9fd20e3f50f04fc9 (patch) | |
tree | c6da3f566f76535206fbec42ade088a5bcffe332 /ctrack/caf/views.py | |
parent | ea1d48ab0a327ec9a2ce6f18989cd1ca5e1dbba5 (diff) |
basic caf detail page implemented - BASIC
Diffstat (limited to '')
-rw-r--r-- | ctrack/caf/views.py | 10 |
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 - - |