forms.py 文件源码

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

项目:ctf-manager 作者: BurningNetel 项目源码 文件源码
def __init__(self, *args, **kwargs):
        super(EventForm, self).__init__(*args, **kwargs)
        self.helper = FormHelper()
        self.helper.form_class = 'form-horizontal'
        self.helper.label_class = 'col-lg-2'
        self.helper.field_class = 'col-lg-8'
        self.helper.form_method = 'post'
        self.helper.form_action = 'newEvent'
        self.helper.layout = Layout(
            Field('name'),
            Field('date', placeholder='yyyy-mm-dd (h24-MM)'),
            HTML('<hr>'),
            Field('end_date', placeholder='yyyy-mm-dd (h24-MM)'),
            Field('description'),
            Field('url'),
            Field('username'),
            Field('password'),
            Field('location'),
            Field('min_score'),
            Field('max_score'),
            FormActions(
                Submit('save', 'Save')
            )
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号