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