我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用django.forms.TimeInput()。
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') ) )