Ticket #3156: datetimefield.patch
File datetimefield.patch, 638 bytes (added by , 18 years ago) |
---|
-
django/db/models/fields/__init__.py
486 486 raise validators.ValidationError, gettext('Enter a valid date/time in YYYY-MM-DD HH:MM format.') 487 487 488 488 def pre_save(self, model_instance, add): 489 value = super(Date TimeField, self).pre_save(model_instance, add)489 value = super(DateField, self).pre_save(model_instance, add) 490 490 if value is not None: 491 491 # MySQL will throw a warning if microseconds are given, because it 492 492 # doesn't support microseconds.