mirror of
https://github.com/bspeice/UNCCGameDay-Server
synced 2024-12-04 13:58:14 -05:00
Send back section and row with the list of users
This commit is contained in:
parent
272f1df89c
commit
cb7d9f9db3
@ -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')
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user