如果表单编码中发生异常,那么返回类型是什么?
认为
if(request.POST):
formvalidate = ValidationRule()
try:
new = formvalidate.to_python(request.POST)
data = Users1( n_date = new['n_date'], heading = new['heading'],
desc = new['desc'], link = new['link'],
module_name = new['module_name'] )
session.add(data)
session.commit()
except formencode.Invalid, e:
errors = e
我们如何找到字段明智的错误