add top ORB/DRB views and urls

This commit is contained in:
nprasad2077 committed 2023-04-26 14:56:07 -05:00
1 parent 38c37a3df2
commit 92cfd0af0f
2 files changed
+23 -1

No files matched your search

+20
View File
@@ -121,3 +121,23 @@ class TopStealsBySeasonList(generics.ListAPIView):
def get_queryset(self):
season = self.kwargs['season']
return PlayerData.objects.filter(season=season).order_by('-STL')[:20]
# Fetch Top 20 players by ORB DESC for season.
class TopOffensiveReboundsBySeasonList(generics.ListAPIView):
serializer_class = PlayerDataSerializer
def get_queryset(self):
season = self.kwargs['season']
return PlayerData.objects.filter(season=season).order_by('-ORB')[:20]
# Fetch Top 20 players by DRB DESC for season.
class TopDefensiveReboundsBySeasonList(generics.ListAPIView):
serializer_class = PlayerDataSerializer
def get_queryset(self):
season = self.kwargs['season']
return PlayerData.objects.filter(season=season).order_by('-DRB')[:20]