top assists view

This commit is contained in:
nprasad2077 committed 2023-04-26 14:02:55 -05:00
1 parent 0ef688071d
commit 2241f2d485
2 files changed
+10 -1

No files matched your search

+8
View File
@@ -81,3 +81,11 @@ class ThreeTwoTopPointTrends(APIView):
})
return Response(data)
# Fetch Top 20 players by AST DESC for season specified.
class TopAssistsBySeasonList(generics.ListAPIView):
serializer_class = PlayerDataSerializer
def get_queryset(self):
season = self.kwargs['season']
return PlayerData.objects.filter(season=season).order_by('-AST')[:20]