Merge branch 'master' of ssh://git.planet-lab.org/git/plstackapi
[plstackapi.git] / planetstack / core / views / deployments.py
diff --git a/planetstack/core/views/deployments.py b/planetstack/core/views/deployments.py
new file mode 100644 (file)
index 0000000..285a53a
--- /dev/null
@@ -0,0 +1,12 @@
+from core.serializers import DeploymentSerializer
+from rest_framework import generics
+from core.models import Deployment
+
+class DeploymentList(generics.ListCreateAPIView):
+    queryset = Deployment.objects.all()
+    serializer_class = DeploymentSerializer
+
+class DeploymentDetail(generics.RetrieveUpdateDestroyAPIView):
+    queryset = Deployment.objects.all()
+    serializer_class = DeploymentSerializer
+