forms.py 文件源码

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

项目:MetaCI 作者: SalesforceFoundation 项目源码 文件源码
def __init__(self, plan, repo, user, *args, **kwargs):
        self.plan = plan
        self.repo = repo
        self.user = user
        super(RunPlanForm, self).__init__(*args, **kwargs)
        self.fields['branch'].choices = self._get_branch_choices()
        self.helper = FormHelper()
        self.helper.form_class = 'form-vertical'
        self.helper.form_id = 'run-build-form'
        self.helper.form_method = 'post'
        self.helper.layout = Layout(
            Fieldset(
                'Choose the branch you want to build',
                Field('branch', css_class='slds-input'),
                css_class='slds-form-element',
            ),
            Fieldset(
                'Enter the commit you want to build.  The HEAD commit on the branch will be used if you do not specify a commit',
                Field('commit', css_class='slds-input'),
                css_class='slds-form-element',
            ),
            Fieldset(
                'Keep org? (scratch orgs only)',
                Field('keep_org', css_class='slds-checkbox'),
                css_class='slds-form-element',
            ),
            FormActions(
                Submit('submit', 'Submit',
                       css_class='slds-button slds-button--brand')
            ),
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号