test
Django获取单选框or多选框
def signup(request):
if request.method == 'GET':
return render(request, 'signup.html')
elif request.method == 'POST':
v = request.POST.get('gender',None) #获取单选
f = request.POST.getlist('favor', None) #获取多个值,多选
print(v,f)
return render(request, 'login.html')