students.py 文件源码

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

项目:studentsdb 作者: PyDev777 项目源码 文件源码
def __init__(self, *args, **kwargs):
        super(StudentUpdateForm, self).__init__(*args, **kwargs)
        self.helper = FormHelper(self)
        self.helper.form_class = 'form-horizontal'
        self.helper.form_method = 'POST'
        self.helper.form_action = reverse('students_edit', kwargs={'pk': kwargs['instance'].id})
        self.helper.help_text_inline = False
        self.helper.label_class = 'col-sm-4'
        self.helper.field_class = 'col-sm-7'
        self.helper.layout = Layout(
            Fieldset('', 'first_name', 'last_name', 'middle_name',
                     AppendedText('birthday', '<span class="glyphicon glyphicon-calendar"></span>'),
                     'photo', 'ticket', 'student_group', 'notes'),
            ButtonHolder(
                Submit('save_button', _(u'Save')),
                Button('cancel_button', _(u'Cancel'), css_class='btn-default')))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号