forms.py 文件源码

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

项目:MetaCI 作者: SalesforceFoundation 项目源码 文件源码
def __init__(self, *args, **kwargs):
        super(AddBranchNotificationForm, self).__init__(*args, **kwargs)
        self.helper = FormHelper()
        self.helper.form_class = 'form-vertical'
        self.helper.form_id = 'add-branch-notification-form'
        self.helper.form_method = 'post'
        self.helper.layout = Layout(
            Fieldset(
                'Select the branch you want to received notification for',
                Field('branch', css_class='slds-input'),
                Field('user', css_class='slds-input'),
                css_class='slds-form-element',
            ),
            Fieldset(
                'Select the build statuses that should trigger a notification',
                Field('on_success', css_class='slds-input'),
                Field('on_fail', css_class='slds-input'),
                Field('on_error', css_class='slds-input'),
                css_class='slds-form-element',
            ),
            FormActions(
                Submit(
                    'submit',
                    'Submit',
                    css_class='slds-button slds-button--brand',
                ),
            ),
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号