使用 Pylons 构建 Formbuild?
当您有相当定制的需求时,使用带有 pylons 的 formbuild 实际上比手动创建自己的表单 html 更容易吗?
Is using formbuild with pylons, when you have pretty customized needs, actually easier than manually creating your own form html?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我真的更喜欢纯 html,但它非常简单
使用如下语法填充选择:
模板:
也是自定义验证,它与 FormEncode 一起处理得很好
I really prefer plain html, but it's super easy
populate a select with a syntax like this:
Template:
also custom validation it's handled pretty well along with FormEncode
如果您使用多种形式,那将很糟糕。
我建议将 Pylons 与 WTForm 一起使用。
为了应对 WTForm,创建一个单独的类,例如,一个布局,它将以您的站点采用的统一标准的形式处理所有字段。
这非常好地将表单的处理放在一个单独的类中,因为不必重做所有表单,只需要更改基类的布局
That would be bad if you use many forms of
I suggest using Pylons with WTForm
To cope with WTForm create a separate class, for example, a Layout that will handle all of the fields in the form of a uniform standard adopted by your site.
This is very good to make the processing of forms in a separate class because they do not have to redo all the forms will only need to change the layout of the base class