X-Git-Url: https://git.mdrn.pl/cas.git/blobdiff_plain/5c901ee485c3abdf11dec71bdb7534f1f6a9eaa9..48ac19869348402509d20001d1132d5c63468055:/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)