Siobhan Tully | 30fd429 | 2013-05-10 08:59:56 -0400 | [diff] [blame] | 1 | from core.serializers import NodeSerializer |
Siobhan Tully | 5d7dc8d | 2013-07-02 13:17:33 -0400 | [diff] [blame] | 2 | from rest_framework import generics |
| 3 | from core.models import Node |
| 4 | |
| 5 | class NodeList(generics.ListCreateAPIView): |
| 6 | queryset = Node.objects.all() |
| 7 | serializer_class = NodeSerializer |
| 8 | |
| 9 | class NodeDetail(generics.RetrieveUpdateDestroyAPIView): |
| 10 | queryset = Node.objects.all() |
| 11 | serializer_class = NodeSerializer |
Tony Mack | 29c287f | 2013-04-11 21:07:16 -0400 | [diff] [blame] | 12 | |
| 13 | |