forms.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:blogghar 作者: v1k45 项目源码 文件源码
def __init__(self, *args, **kwargs):
        super(CustomChangePwdForm, self).__init__(*args, **kwargs)

        self.helper = FormHelper(self)
        self.helper.form_tag = False
        self.helper.form_show_labels = True

        for field in self.fields:
            self.fields[field].widget.attrs['placeholder'] = None
            del self.fields[field].widget.attrs['placeholder']

        self.helper.layout = Layout(
            'oldpassword', 'password1', 'password2',
            StrictButton(
                'Change Password', type='submit', name='action',
                css_class='btn blue waves-effect waves-light btn-large')
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号