django.forms.TimeInput - python examples

Here are the examples of the python api django.forms.TimeInput taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

3 View Complete Implementation :
Copyright GNU Affero General Public License v3.0
Author : nesdis
    def test_format(self):
        Use 'format' to change the way a value is displayed.
        t = time(12, 51, 34, 482548)
        widget = TimeInput(format='%H:%M', attrs={'type': 'time'})
        self.check_html(widget, 'time', t, html='<input type="time" name="time" value="12:51">')

3 View Complete Implementation :
Copyright GNU General Public License v3.0
Author : Uninett
    def __init__(self, *args, **kwargs):
        super(AlertProfileForm, self).__init__(*args, **kwargs)

        self.fields['daily_dispatch_time'].widget = forms.TimeInput(
        self.fields['weekly_dispatch_time'].widget = forms.TimeInput(
        self.helper = FormHelper()
        self.helper.form_tag = False
        self.helper.layout = Layout(
            'id', 'name',
                Column('daily_dispatch_time', css_clast='medium-4'),
                Column('weekly_dispatch_time', css_clast='medium-4'),
                Column(Field('weekly_dispatch_day', css_clast='select2'),