def __init__(self, formdata=None, obj=None, data=None, *args, **kwargs):
super(PeeweeForm, self).__init__(formdata=formdata, obj=obj, data=data, *args, **kwargs)
if obj is not None and not isinstance(obj, Model):
raise PeeweeFormException(u'obj must None or peewee model instance.')
self.obj = obj
self._validate = False
评论列表
文章目录