我正在用滤锅和变形实现一个简单的表格;但是,我希望覆盖默认样式表并提供我自己的样式表。但是,我不知道如何为表单提供自己的样式。这是我正在使用的代码:
class Mapping(colander.Schema):
Firstname = colander.SchemaNode(colander.String(), css_class='deform-widget-with-style')
Lastname = colander.SchemaNode(colander.String(), css_class='deform-widget-with-style')
Email = colander.SchemaNode(colander.String(), css_class='deform-widget-with-style')
date = colander.SchemaNode(colander.Date(), widget = deform.widget.DatePartsWidget(), description = "content date")
class Schema(colander.Schema):
Age = colander.SchemaNode(colander.Integer(), css_class='deform-widget-with-style')
Firstname = colander.SchemaNode(colander.String(), css_class='deform-widget-with-style')
Lastname = colander.SchemaNode(colander.String(), css_class='deform-widget-with-style')
Email = colander.SchemaNode(colander.String(), css_class='deform-widget-with-style')
form = deform.Form(topList(),buttons=('submit',)).render(controlData)
当我运行它时,我得到一个计划,默认用户表单。如何为我自己的模板提供按钮和输入框的样式?非常感谢任何建议或答案。
当前形式:
所需的输入字段样式:
所需的按钮样式: