我们从Python开源项目中,提取了以下43个代码示例,用于说明如何使用wtforms.fields.FloatField()。
def convert_FloatProperty(model, prop, kwargs): """Returns a form field for a ``db.FloatProperty``.""" return f.FloatField(**kwargs)
def convert_FloatProperty(self, model, prop, kwargs): """Returns a form field for a ``ndb.FloatProperty``.""" return f.FloatField(**kwargs)
def conv_Float(self, model, field, kwargs): self._number_common(model, field, kwargs) return f.FloatField(**kwargs)
def coerce(self, field_type): coercions = { "IntField": int, "BooleanField": bool, "FloatField": float, "DecimalField": decimal.Decimal, "ObjectIdField": ObjectId } if sys.version_info >= (3, 0): return coercions.get(field_type, str) else: return coercions.get(field_type, unicode)