mirror of
https://github.com/nprasad2077/nbaStats.git
synced 2026-11-15 14:23:46 +00:00
update views to serve data proper
This commit is contained in:
1 parent
c9711ddd19
commit
0ef688071d
1 file changed
+4
-4
+4
-4
@@ -65,12 +65,12 @@ class ThreeTwoTopPointTrends(APIView):
|
|||||||
for season in seasons:
|
for season in seasons:
|
||||||
season_data = PlayerData.objects.filter(season=season)
|
season_data = PlayerData.objects.filter(season=season)
|
||||||
avg_three_made = season_data.aggregate(Avg('three_fg'))[
|
avg_three_made = season_data.aggregate(Avg('three_fg'))[
|
||||||
'three_fg_avg']
|
'three_fg__avg']
|
||||||
avg_three_attempts = season_data.aggregate(Avg('three_attempts'))[
|
avg_three_attempts = season_data.aggregate(Avg('three_attempts'))[
|
||||||
'three_attempts_avg']
|
'three_attempts__avg']
|
||||||
avg_two_made = season_data.aggregate(Avg('two_fg'))['two_fg_avg']
|
avg_two_made = season_data.aggregate(Avg('two_fg'))['two_fg__avg']
|
||||||
avg_two_attempts = season_data.aggregate(Avg('two_attempts'))[
|
avg_two_attempts = season_data.aggregate(Avg('two_attempts'))[
|
||||||
'two_attempts_avg']
|
'two_attempts__avg']
|
||||||
|
|
||||||
data.append({
|
data.append({
|
||||||
'season': season,
|
'season': season,
|
||||||
|
|||||||
Reference in new issue
Block a user