如何在Django中添加这些字段?

2024-06-26 09:46:05 发布

您现在位置:Python中文网/ 问答频道 /正文

表格已经提交了,我做了一个请求.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()

Tags: numberobjectsconnectionpresentationpost表格scoringpk