Python wtforms.fields 模块,PasswordField() 实例源码

我们从Python开源项目中,提取了以下3个代码示例,用于说明如何使用wtforms.fields.PasswordField()

项目:pygameweb    作者:pygame    | 项目源码 | 文件源码
def scaffold_form(self):
        form_class = super(UserAdmin, self).scaffold_form()
        form_class.password2 = PasswordField('New Password')
        return form_class
项目:flask-zhenai-mongo-echarts    作者:Fretice    | 项目源码 | 文件源码
def conv_String(self, model, field, kwargs):
        if field.regex:
            kwargs['validators'].append(validators.Regexp(regex=field.regex))
        self._string_common(model, field, kwargs)
        password_field = kwargs.pop('password', False)
        textarea_field = kwargs.pop('textarea', False) or not field.max_length
        if password_field:
            return f.PasswordField(**kwargs)
        if textarea_field:
            return f.TextAreaField(**kwargs)
        return f.StringField(**kwargs)
项目:wtforms-lightmagic    作者:tornado-lightmagic    | 项目源码 | 文件源码
def convert_crypto_aes(self, field, field_args):
        return wtforms_fields.PasswordField(**field_args)