Werkzeug with multiples HTML forms in the same page

4 views
Skip to first unread message

Henrique Donancio

unread,
Jul 23, 2018, 3:27:32 PM7/23/18
to pocoo-libs

I created my fist aplication in Werkzeug (Python based). It's a simple HTML page with 3 forms, and Werkzeug needs get this information and handled it. I'm new in HTML, as in Werkzeug too.


I started by first Werkzeug example, but I not understand all. Werkzeug have an url_map. For me, it's useful for Werkzeug determines what page and method is starter.


Them, in my example bellow, I have on_layout method and layout.html page. It's work very well for first form only. I can POST how many informations desire and Werkzeug handled it (only for the first form in .html page), but when I put information in the second form, an 400 error happens, but I test the content of each form every time!


I suspect that I can't handled map and "on_" methods well. I not understand the relation between them. In resume, I need switch between html templates and get the informations of forms.


I attach htlm page and werkzeug class

layout.html
untitled.py
Reply all
Reply to author
Forward
0 new messages