Python WTForms 2.0 发布 - digwtx's Blog

Python WTForms 2.0 发布

digwtx posted @ 2014年9月01日 13:19 in Python , 1425 阅读

WTForms 是一个 Python 表单验证、渲染开发包。WTForms 2.0 于2014年5月发布,这是继 WTForms 1.0.5 之后第一个重要的版本。

新特性

  • Class Meta 可以从多方面定制 WTForms
  • CSRF 和 i18n 由扩展变成核心特性
  • Widget 渲染变更

不推荐使用的API

这些API仍然有效,但在很多情况下,会引发弃用警告。这些API在3.0的时候将完全移除,尽量写符合新API的代码,除非需要在 WTForms 1.X 和 2.X 交叉使用。

核心API

  • Form._get_translations 改为 Meta.get_translations
  • TextField ( StringField 的另一种形式)弃用
  • wtforms.validators.Required 改为 wtforms.validators.DataRequired
  • wtforms.fields._unset_value 改为 wtforms.utils.unset_value

WTForms 扩展

所有扩展将会被弃用。这些扩展会从 WTForms 中抽离出来,允许他们有单独的发布时间表,使得适合于他们的companion libraries。

  • wtforms.ext.appengine 被弃用。参考 WTForms-Appengine
  • wtforms.ext.csrf CSRF为内置模块
  • wtforms.ext.dateutil 被弃用, 但现在没有找到好归宿
  • wtforms.ext.django 被弃用。 参考 WTForms-Django
  • wtforms.ext.i18n i18n为内置模块
  • wtforms.ext.sqlalchemy 被弃用。参考 WTForms-Alchemy

详细信息请查看:http://wtforms.readthedocs.org/en/latest/whats_new.html

原文:http://flask123.sinaapp.com/article/32/

Avatar_small
instagram password h 说:
2019年6月21日 12:48

Instagram password hacking is not the right way, if you want to learn hacking, click here to hack Instagram and see our tutorial and learn how to hack an Instagram account.

Avatar_small
cleaning services 说:
2019年9月12日 15:37

Here is the same regarding private properties. Many folks love creating a cleaning service can be found in to clear those parts of your home that a lot of people hate to completely clean. Perhaps they are going to contract using a company to be able to just carry out floors, house windows, toilets and also bathtubs as well as the rest the master will carry out. Or they could have someone who want the complete home cleaned a few times a few days. Having any cleaning business who give you a large selection of services can easily surely you should everyone.

Avatar_small
Tiffany Cawley 说:
2020年3月16日 16:40

All the changes of the ground are ensured for the tam. Particles of the top paper writing service are affiliated for the mode of the plants. The brick pace is done for all humans. Fitness is hoisted for the flag. Ceremony is ensured for the management of the affairs.

Avatar_small
www.biohazardtechnol 说:
2020年6月04日 19:40

Technological know-how has astonishingly changed the best way we dwell today, there is absolutely no denial going without running shoes. Compared with the ancestors, we stand miles away from these individuals in applying different technologies for our day-to-day is effective

Avatar_small
www.thaicitrustechno 说:
2020年6月04日 19:41

Coaching with technology aids you to expand scholar learning by means of assistant tutorial objectives. Even so, it is usually thought-provoking to pick out the very best technology tools although not losing sight on the goal intended for student finding out. An expert can buy creative in addition to constructive strategies to integrate technological know-how into your class.

Avatar_small
www.handisports.net 说:
2020年6月04日 19:41

Activities Play-by-Play with TV: While using the need intended for TV activities broadcasters on national degrees, the the vast majority cable in addition to regional programmes have modest sporting events which involve somebody to help call those things.

Avatar_small
prhomeschool.com 说:
2020年6月04日 19:42

Often, a home is actually a person's solo largest economical investment. So ,, it is essential to uncover the best promotion strategies if selling real estate. Staging is undoubtedly an important element of a housing marketing system, and should be thought about in order selling the dwelling faster and for any most capital.

Avatar_small
mvhomeinspections.co 说:
2020年6月04日 19:42

Despite how extensive you've lived in your own home the decision that will put it that you can buy comes which includes a laundry directory of questions, along with, stress : especially whether it's your newbie through your property sale approach.

Avatar_small
full time maids in d 说:
2020年6月11日 16:43

the reason why you even look at a maid service is always to make your own personal busy and also stressful living easier. This means you should ensure no matter which company you take part in this role gets the flexibility to do business with you along with your busy plan.

Avatar_small
painting company in 说:
2020年6月11日 16:44

Abandon it to be able to lawyers to be able to pinpoint the crucial difference between the real deal - a proper guarantee that is targeted on prevention, not necessarily clean-up, and requires the complete business to guide it - plus a interesting marketing and advertising trick.

Avatar_small
dial a maid dubai 说:
2021年6月13日 13:41

Were a remarkably reputed cleanup company delivering among the best cleaning along with professional renovator services. We are only the most effective local cleanup companies throughout Dubai. Not simply do we serve residential clientele, we further target corporate customers also.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter
Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee