This topic created in 3339 days ago, the information mentioned may be changed or developed.
我的定义是这样的,没有另外键另一个表,能不能在模板上取到我选择的值
user_type = SelectField(u'用户类型', validators=[Required()] ,choices=[('0', u'房客'),('1', u'房东')])
1 replies 2017-03-06 23:20:32 +08:00  | | 1 codeframe Mar 6, 2017 在模板里直接用 form.user_type() 会自动帮你生成对应的选择列表 |