Siobhan Tully | bf1153a | 2013-05-27 20:53:48 -0400 | [diff] [blame] | 1 | from core.serializers import DeploymentSerializer |
Siobhan Tully | 5d7dc8d | 2013-07-02 13:17:33 -0400 | [diff] [blame] | 2 | from rest_framework import generics |
| 3 | from core.models import Deployment |
Tony Mack | 2d81e63 | 2013-04-09 02:34:10 -0400 | [diff] [blame] | 4 | |
Siobhan Tully | 5d7dc8d | 2013-07-02 13:17:33 -0400 | [diff] [blame] | 5 | class DeploymentList(generics.ListCreateAPIView): |
| 6 | queryset = Deployment.objects.all() |
| 7 | serializer_class = DeploymentSerializer |
Tony Mack | 2d81e63 | 2013-04-09 02:34:10 -0400 | [diff] [blame] | 8 | |
Siobhan Tully | 5d7dc8d | 2013-07-02 13:17:33 -0400 | [diff] [blame] | 9 | class DeploymentDetail(generics.RetrieveUpdateDestroyAPIView): |
| 10 | queryset = Deployment.objects.all() |
| 11 | serializer_class = DeploymentSerializer |
Tony Mack | 2d81e63 | 2013-04-09 02:34:10 -0400 | [diff] [blame] | 12 | |