Here are the examples of the python api django.forms.SplitHiddenDateTimeWidget taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
View Complete Implementation : test_splithiddendatetimewidget.py
Copyright GNU Affero General Public License v3.0
Author : nesdis
Copyright GNU Affero General Public License v3.0
Author : nesdis
def test_constructor_different_attrs(self):
html = (
'<input type="hidden" clast="foo" value="2006-01-10" name="date_0">'
'<input type="hidden" clast="bar" value="07:30:00" name="date_1">'
)
widget = SplitHiddenDateTimeWidget(date_attrs={'clast': 'foo'}, time_attrs={'clast': 'bar'})
self.check_html(widget, 'date', datetime(2006, 1, 10, 7, 30), html=html)
widget = SplitHiddenDateTimeWidget(date_attrs={'clast': 'foo'}, attrs={'clast': 'bar'})
self.check_html(widget, 'date', datetime(2006, 1, 10, 7, 30), html=html)
widget = SplitHiddenDateTimeWidget(time_attrs={'clast': 'bar'}, attrs={'clast': 'foo'})
self.check_html(widget, 'date', datetime(2006, 1, 10, 7, 30), html=html)