Commit c3cd1719 authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Remove obsolete class

parent a2fed3ac
......@@ -4,10 +4,6 @@ from django.conf.urls import url
# from rest_framework import routers
from . import views
# router = routers.DefaultRouter(trailing_slash=False)
# router.register(
# r'deployments', views.ClientViewSet, base_name='deployments')
urlpatterns = [
# url(r'^', include(router.urls)),
url(r'^deployments', views.DeploymentsView.as_view()),
......
......@@ -133,24 +133,3 @@ class DeploymentView(views.APIView):
deployment.save()
return state_response(request)
class ClientViewSet(viewsets.ModelViewSet):
authentication_classes = (TokenAuthentication,)
serializer_class = serializers.ClientViewSerializer
def get_queryset(self):
# services of this client
services = self.request.user.site.services.all()
deployments = {}
for service in services:
deployments[service.name] = []
for deployment in service.deployments.all():
deployments[service.name].append(
serializers.UserSerializer(deployment.user).data
)
c = models.ClientView()
c.deployments = deployments
return [c]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment