Siobhan Tully | 30fd429 | 2013-05-10 08:59:56 -0400 | [diff] [blame] | 1 | from core.serializers import ImageSerializer |
Siobhan Tully | 5d7dc8d | 2013-07-02 13:17:33 -0400 | [diff] [blame] | 2 | from rest_framework import generics |
| 3 | from core.models import Image |
Tony Mack | 5331008 | 2013-04-09 09:26:12 -0400 | [diff] [blame] | 4 | |
Siobhan Tully | 5d7dc8d | 2013-07-02 13:17:33 -0400 | [diff] [blame] | 5 | class ImageList(generics.ListCreateAPIView): |
| 6 | queryset = Image.objects.all() |
| 7 | serializer_class = ImageSerializer |
Tony Mack | 5331008 | 2013-04-09 09:26:12 -0400 | [diff] [blame] | 8 | |
Siobhan Tully | 5d7dc8d | 2013-07-02 13:17:33 -0400 | [diff] [blame] | 9 | class ImageDetail(generics.RetrieveUpdateDestroyAPIView): |
| 10 | queryset = Image.objects.all() |
| 11 | serializer_class = ImageSerializer |
Tony Mack | 5331008 | 2013-04-09 09:26:12 -0400 | [diff] [blame] | 12 | |