|
@@ -3769,7 +3769,8 @@ def get_user_markscore_week_avg(request):
|
|
msret = msret.values("stock_date").distinct()
|
|
msret = msret.values("stock_date").distinct()
|
|
for item in msret:
|
|
for item in msret:
|
|
qset = cm.UserMarkScore.objects.filter(stock_date=item['stock_date']).aggregate(avg_score=Avg("score"))
|
|
qset = cm.UserMarkScore.objects.filter(stock_date=item['stock_date']).aggregate(avg_score=Avg("score"))
|
|
- data.append({"stock_date":item['stock_date'],"avg_score":qset.get("avg_score",0)})
|
|
|
|
|
|
+ avg_score = "{}".format(round(qset.get("avg_score",0),1))
|
|
|
|
+ data.append({"stock_date":item['stock_date'],"avg_score":avg_score})
|
|
# for i in range(1,5):
|
|
# for i in range(1,5):
|
|
# item_list = []
|
|
# item_list = []
|
|
# for j in range(1,8):
|
|
# for j in range(1,8):
|