【发布时间】:2015-06-16 04:25:57
【问题描述】:
我搜索了一段时间,但找不到有关如何从配置文件或数据库中检索滤锅架构的参考资料。我认为这并不难实现,但我可能忽略了一些东西。也许有人做过或看到过类似的事情,并且可能会分享一些见解。
这里是滤锅模式的示例:
class PageSchema(colander.MappingSchema):
title = SchemaNode(String(),
title='Page title',
description='The title of the page',
)
description = SchemaNode(String(),
title='A short description',
description='Keep it under 60 characters or so',
missing = u'',
validator=colander.Length(max=79)
)
body = colander.SchemaNode(colander.String(),
description='Tell the world',
missing = u'')
【问题讨论】:
标签: python schema pyramid colander