Siobhan Tully | 30fd429 | 2013-05-10 08:59:56 -0400 | [diff] [blame] | 1 | from core.serializers import SiteSerializer |
Siobhan Tully | 5d7dc8d | 2013-07-02 13:17:33 -0400 | [diff] [blame] | 2 | from rest_framework import generics |
3 | from core.models import Site | ||||
4 | |||||
5 | class SiteList(generics.ListCreateAPIView): | ||||
6 | queryset = Site.objects.all() | ||||
7 | serializer_class = SiteSerializer | ||||
8 | |||||
9 | class SiteDetail(generics.RetrieveUpdateDestroyAPIView): | ||||
10 | queryset = Site.objects.all() | ||||
11 | serializer_class = SiteSerializer |