contact_admin.py 文件源码

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

项目:studentsdb2 作者: trivvet 项目源码 文件源码
def __init__(self, *args, **kwargs):
        super(ContactForm, self).__init__(*args, **kwargs)
        self.helper = FormHelper()

        # set form tag attributes
        self.helper.action = reverse('contact_admin')
        self.helper.form_method = 'POST'
        self.helper.form_class = 'form-horizontal contact-form'

        # set form field properties
        self.helper.help_text_inline = True
        self.helper.html5_required = False
        self.helper.attrs = {'novalidate': ''}
        self.helper.label_class = 'col-sm-2 control-label'
        self.helper.field_class = 'col-sm-10'


        # add buttons
        self.helper.add_input(Submit('send_button', _(u'Submit')))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号