How to handle multiple forms in one template with Django

preview_player
Показать описание
This is a solution for handling multiple forms in one template.
1. put a hidden input field in each form with a name and value: formA, formB, formC
2. Analyze the Request.POST object on submission to find which one was submitted
3. Handle and validate
Рекомендации по теме
Комментарии
Автор

I know this is an old video but I just wanted to say that you've summarized in less than three minutes something that I've been trying to research for hours. Every post I go to seems to have a different answer and somehow none of them work for me except for this one. Thanks a lot, dude!

cyphersproject
Автор

Interesting and very clear, thank you. How to have a single update button as opposed to 3 of them?

ericxls
Автор

Good video bro you saved me a lot of effort <3

damine
Автор

Hey bro, can you make a video for the UpdateView if this?

flipdruid