mirror of
https://github.com/nprasad2077/nbaStats.git
synced 2026-11-09 19:40:39 +00:00
player lookup changes
This commit is contained in:
1 parent
8010111e82
commit
395f15683a
2 files changed
+5
-5
No files matched your search
+4
-4
@@ -32,20 +32,20 @@ class PlayerDataByTeamList(generics.ListAPIView):
|
||||
|
||||
# Fetch player data by season
|
||||
class PlayerDataBySeasonList(generics.ListAPIView):
|
||||
serializer_class = PlayerDataSerializer
|
||||
serializer_class = PlayerTotalsDataSerializer
|
||||
|
||||
def get_queryset(self):
|
||||
season = self.kwargs['season']
|
||||
return PlayerData.objects.filter(season=season)
|
||||
return PlayerTotalsData.objects.filter(season=season)
|
||||
|
||||
|
||||
# Fetch player data by player name
|
||||
class PlayerDataByNameList(generics.ListAPIView):
|
||||
serializer_class = PlayerDataSerializer
|
||||
serializer_class = PlayerTotalsDataSerializer
|
||||
|
||||
def get_queryset(self):
|
||||
name = self.kwargs['name']
|
||||
return PlayerData.objects.filter(name__icontains=name)
|
||||
return PlayerTotalsData.objects.filter(name__icontains=name)
|
||||
|
||||
|
||||
# Fetch Top 20 players by PTS DESC for the season specified.
|
||||
|
||||
Reference in new issue
Block a user