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

时间:2014-09-05 17:33:01

标签: python django python-2.7 django-models django-views

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

0 个答案:

没有答案