forms.py 文件源码

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

项目:waves-demo 作者: lirmm 项目源码 文件源码
def __init__(self, *args, **kwargs):
        super(FrontProfileForm, self).__init__(*args, **kwargs)
        self.helper = FormHelper()
        self.helper.form_tag = False
        self.helper.form_class = 'form-horizontal'
        self.helper.label_class = 'col-lg-4'
        self.helper.field_class = 'col-lg-8'
        self.helper.layout = Layout(
            # Div('picture', css_class='btn-file'),
            Fieldset("Details",
                     'institution',
                     'country',
                     'phone',
                     'picture'),
            Field('comment'),
            Div(
                Submit('delete_profile', 'Delete your account',
                       css_class='btn-danger btn btn-md',
                       type="submit",
                       data_placement="left",
                       data_toggle='confirmation'),
                Submit('update', 'Update', css_class="btn btn-md btn-primary center"),
                css_class='pull-right',
                style='margin-top:1%; margin-right:1%'
            )
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号