我想为表单创建一个用户组 当我实例用户个人资料时,它的工作有效,但对实例用户组无效 有我的密码
这是视图:
actuals1 = [34, 34, 84, 28, 56, 56, 0, 0, 100]
actuals2 = [3.4, 3.4, 8.4, 2.8, 5.6, 5.6, 0, 0, 10]
actuals3 = [340, 340, 840, 280, 560, 560, 0, 0, 1000]
actuals4 = [17, 17, 42, 14, 28, 28 0, 0, 50]
这是表格:
test = User.objects.get(id=id)
second_form = UpdateAccountDetailForm(request.POST or None, instance=test.profile)
third_form = GroupUserForm(request.POST or None, instance=test.groups)
if request.method == 'POST':
form = UsersForm(request.POST, instance=test)
form2 = second_form
form3 = third_form