Here are the examples of the python api django.forms.DateTimeInput taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Source : test_datetimeinput.py
with Apache License 2.0
from gethue
with Apache License 2.0
from gethue
def test_render_formatted(self):
"""
Use 'format' to change the way a value is displayed.
"""
widget = DateTimeInput(
format='%d/%m/%Y %H:%M', attrs={'type': 'datetime'},
)
d = datetime(2007, 9, 17, 12, 51, 34, 482548)
self.check_html(widget, 'date', d, html=' < input type="datetime" name="date" value="17/09/2007 12:51" />')
@override_settings(USE_L10N=True)