本文整理汇总了Python中marshmallow.validates方法的典型用法代码示例。如果您正苦于以下问题:Python marshmallow.validates方法的具体用法?Python marshmallow.validates怎么用?Python marshmallow.validates使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类marshmallow
的用法示例。
在下文中一共展示了marshmallow.validates方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import marshmallow [as 别名]
# 或者: from marshmallow import validates [as 别名]
def __init__(self):
self.Serializer = flask_ma.Schema
self.ModelSerializer = ModelSerializer
# alias marshmallow stuffs
self.pre_load = ma.pre_load
self.post_load = ma.post_load
self.pre_dump = ma.pre_dump
self.post_dump = ma.post_dump
self.validates = ma.validates
self.validates_schema = ma.validates_schema
self.ValidationError = ma.ValidationError
# alias marshmallow fields
self.Bool = ma.fields.Bool
self.Boolean = ma.fields.Boolean
self.Constant = ma.fields.Constant
self.Date = ma.fields.Date
self.DateTime = ma.fields.DateTime
self.NaiveDateTime = ma.fields.NaiveDateTime
self.AwareDateTime = ma.fields.AwareDateTime
self.Decimal = ma.fields.Decimal
self.Dict = ma.fields.Dict
self.Email = ma.fields.Email
self.Field = ma.fields.Field
self.Float = ma.fields.Float
self.Function = ma.fields.Function
self.Int = ma.fields.Int
self.Integer = ma.fields.Integer
self.List = ma.fields.List
self.Mapping = ma.fields.Mapping
self.Method = ma.fields.Method
self.Nested = ma.fields.Nested
self.Number = ma.fields.Number
self.Pluck = ma.fields.Pluck
self.Raw = ma.fields.Raw
self.Str = ma.fields.Str
self.String = ma.fields.String
self.Time = ma.fields.Time
self.TimeDelta = ma.fields.TimeDelta
self.Tuple = ma.fields.Tuple
self.UUID = ma.fields.UUID
self.Url = ma.fields.Url
self.URL = ma.fields.URL
# alias flask_marshmallow fields
self.AbsoluteUrlFor = flask_ma.fields.AbsoluteUrlFor
self.AbsoluteURLFor = flask_ma.fields.AbsoluteURLFor
self.UrlFor = flask_ma.fields.UrlFor
self.URLFor = flask_ma.fields.URLFor
self.Hyperlinks = flask_ma.fields.Hyperlinks
self.HyperlinkRelated = HyperlinkRelated