Send back section and row with the list of users

This commit is contained in:
Bradlee Speice 2013-12-06 14:48:28 -05:00
parent 272f1df89c
commit cb7d9f9db3
2 changed files with 2 additions and 2 deletions

View File

@ -22,4 +22,4 @@ class UserSerializer(serializers.ModelSerializer):
class SingleUserSerializer(serializers.ModelSerializer): class SingleUserSerializer(serializers.ModelSerializer):
class Meta: class Meta:
model = RegisteredUser model = RegisteredUser
fields = ('id', 'first_name', 'last_name') fields = ('id', 'first_name', 'last_name', 'section', 'row')

View File

@ -84,7 +84,7 @@ class RegisterUser(APIView):
def get(self, request): def get(self, request):
'Get the first and last names of all registered users' 'Get the first and last names of all registered users'
one_week = timedelta(7) one_week = timedelta(7)
users = RegisteredUser.objects.filte(date_registered__gt=datetime.now()-one_week) users = RegisteredUser.objects.filter(date_registered__gt=datetime.now()-one_week)
users_s = SingleUserSerializer(users, many=True) users_s = SingleUserSerializer(users, many=True)
return Response(users_s.data) return Response(users_s.data)