2
django.froms.DateField
and django.forms.TimeField
both have an input parameter named input_formats
which is a list of date and time input formats, respectively. They define what patterns should be attempted when parsing the user input.
date = DateField(input_formats=['%d-%m-%Y'])
intime = TimeField(input_formats=['%H:%M'])
See https://docs.djangoproject.com/en/1.8/ref/forms/fields/# for details.
Source:stackexchange.com