mirror of
https://github.com/nprasad2077/nbaStats.git
synced 2026-11-06 01:50:33 +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
@@ -27,7 +27,7 @@ from nba_data.models import PlayerPlayoffAdvancedData
|
||||
# Change LAC to SDC for 1984 and prior.
|
||||
|
||||
|
||||
teams = ['HOU' ,'PHI', 'BOS', 'NYK', 'BRK', 'TOR', 'MEM', 'NOP', 'DAL', 'SAS', 'DEN', 'MIN', 'OKC', 'UTA', 'POR', 'MIL', 'CLE', 'CHI', 'IND', 'DET', 'SAC', 'PHO', 'GSW', 'LAC', 'LAL', 'MIA', 'ATL', 'WAS', 'ORL', 'CHA']
|
||||
teams = ['ATL', 'BOS', 'BRK', 'CHI', 'CHO', 'CLE', 'DAL', 'DEN', 'DET', 'GSW', 'HOU', 'IND', 'LAC', 'LAL', 'MEM', 'MIA', 'MIL', 'MIN', 'NOP', 'NYK', 'OKC', 'ORL', 'PHI', 'PHO', 'POR', 'SAC', 'SAS', 'TOR', 'UTA', 'WAS']
|
||||
|
||||
single_team = ['GSW']
|
||||
|
||||
|
||||
+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