because you're passing commit=False with form2
On Tue, 1 Jun 2021 at 14:10, Hugh Frost wrote:
> def detail(request):
> if request.method == 'POST':
> baby_form1 = BabyForm1(data=request.POST)
> baby_form2 = BabyForm2(data=request.POST)
>
> if baby_form1.is_valid() and
def detail(request):
if request.method == 'POST':
baby_form1 = BabyForm1(data=request.POST)
baby_form2 = BabyForm2(data=request.POST)
if baby_form1.is_valid() and baby_form2.is_valid():
baby_form1.save()
print(baby_form1)
baby_form2.b
2 matches
Mail list logo