Ticket #6035: splitdatetimefield.diff

File splitdatetimefield.diff, 1.0 KB (added by David Tulig, 17 years ago)
  • django/newforms/fields.py

     
    2020from django.utils.encoding import StrAndUnicode, smart_unicode
    2121
    2222from util import ErrorList, ValidationError
    23 from widgets import TextInput, PasswordInput, HiddenInput, MultipleHiddenInput, FileInput, CheckboxInput, Select, NullBooleanSelect, SelectMultiple, DateTimeInput
     23from widgets import TextInput, PasswordInput, HiddenInput, MultipleHiddenInput, FileInput, CheckboxInput, Select, NullBooleanSelect, SelectMultiple, DateTimeInput, SplitDateTimeWidget
    2424
    2525
    2626__all__ = (
     
    733733            DateField(error_messages={'invalid': errors['invalid_date']}),
    734734            TimeField(error_messages={'invalid': errors['invalid_time']}),
    735735        )
     736        self.widget = SplitDateTimeWidget
    736737        super(SplitDateTimeField, self).__init__(fields, *args, **kwargs)
    737738
    738739    def compress(self, data_list):
Back to Top