Using webapp2, how can I get the value of a form's "name" attribute during a POST request?

124 Views Asked by At

Code:

<form role="form" name="upload_type" action="/upload" method="POST" enctype="multipart/form-data"> 

I would like to inform my application to what type of form is being submitted by a user. I thought I could use the form's "name" attribute but can not figure out how to retrieve this value using webapp2.

1

There are 1 best solutions below

0
On

Read: How to get the name of a submitted form in Flask?

For your python html forms I recommend which will help you get everything about your form in webapp2 in one line of code . You can read the manual about wtforms and what it can do. I recommend it for all your python forms.