Python django.forms 模块,TimeInput() 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用django.forms.TimeInput()

项目:nav    作者:UNINETT    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        super(AlertProfileForm, self).__init__(*args, **kwargs)

        self.fields['daily_dispatch_time'].widget = forms.TimeInput(
            format='%H:%M')
        self.fields['weekly_dispatch_time'].widget = forms.TimeInput(
            format='%H:%M')
        self.helper = FormHelper()
        self.helper.form_tag = False
        self.helper.layout = Layout(
            'id', 'name',
            Row(
                Column('daily_dispatch_time', css_class='medium-4'),
                Column('weekly_dispatch_time', css_class='medium-4'),
                Column(Field('weekly_dispatch_day', css_class='select2'),
                       css_class='medium-4')
            )
        )