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