diff options
Diffstat (limited to '')
-rw-r--r-- | ctrack/caf/views.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ctrack/caf/views.py b/ctrack/caf/views.py index d20b503..405fa0e 100644 --- a/ctrack/caf/views.py +++ b/ctrack/caf/views.py @@ -1,6 +1,7 @@ from django.views.generic import CreateView, ListView from ctrack.caf.forms import CAFForm +from ctrack.caf.models import EssentialService class CreateCAF(CreateView): @@ -16,3 +17,16 @@ class CreateCAF(CreateView): class ListCAF(ListView): pass + +class ListEssentialService(ListView): + model = EssentialService + + def get_queryset(self): + ess = EssentialService.objects.all().order_by("organisation__name") + return ess + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + return context + + |