表单已经提交,我做了一个request.POST来获取值,现在我想把它们放到一个表中并添加它们。
查看:
inst = TableRound_1.objects.get(pk=int(pk))
scoring = TableScore.objects.create(couple_r1 = inst, number = number, judge = judge, timing = timing, technique = technique, connection = connection, presentation = presentation, difficulty = difficulty, choreo = choreo )
inst.score = scoring.aggregate(Sum[timing, technique, connection, presentation, difficulty, choreo])
inst.save()