Why use WTForms instead of just posting with HTML

限于喜欢 提交于 2019-12-01 07:32:52

I could say CSRF protection is one of the greatest reasons, but there are a lot of reasons why one would use WTFroms over plain HTML forms.

  • CSRF protection out of the box
  • Form validation out the box
  • WTForms come as classes, so all the good come's from an object form.

basically, if your project has a lot of form's looking the same with minor differences, WTForms would be of great help.

and then you have validations out of the box, you use a simple validation for Email and all other kind's of data, and they are there, no need to bother with writing your own validators and keep maintaining them.

CSRF is one of the owasp top 10 attacks[1], so providing good protection over this is really important.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!