-from django.views.generic import DetailView
+from django.contrib.auth.mixins import LoginRequiredMixin
+from django.views.generic import DetailView, ListView
from .models import Service
obj = None
return obj
+
+class ServicesView(LoginRequiredMixin, ListView):
+ def get_queryset(self):
+ return Service.for_user(self.request.user)
+
+
+class ServiceDetail(LoginRequiredMixin, DetailView):
+ def get_queryset(self):
+ return Service.for_user(self.request.user)