Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
代码:
<form role="form" name="upload_type" action="/upload" method="POST" enctype="multipart/form-data">
我想告知我的应用程序用户正在提交什么类型的表单。我以为我可以使用表单的“名称”属性,但无法弄清楚如何使用webapp2.
webapp2
阅读:如何在 Flask 中获取已提交表单的名称?
对于您的 python html 表单,我推荐wtforms,它可以帮助您在一行代码python中获取有关 webapp2 中表单的所有信息。您可以阅读有关 wtforms 及其功能的手册。我推荐它用于你所有的 python 表单。