X-Git-Url: https://git.mdrn.pl/cas.git/blobdiff_plain/5c901ee485c3abdf11dec71bdb7534f1f6a9eaa9..40ba7c29763bfe39154f8b6444bf8b3b4ad0c56c:/src/services/views.py?ds=inline diff --git a/src/services/views.py b/src/services/views.py index f599592..f96dd0b 100644 --- a/src/services/views.py +++ b/src/services/views.py @@ -1,4 +1,4 @@ -from django.views.generic import DetailView +from django.views.generic import DetailView, ListView from .models import Service @@ -13,3 +13,12 @@ class SshAuthorizedKeysView(DetailView): obj = None return obj + +class ServicesView(ListView): + def get_queryset(self): + return Service.for_user(self.request.user) + + +class ServiceDetail(DetailView): + def get_queryset(self): + return Service.for_user(self.request.user)