Ticket #3156: datetimefield.patch

File datetimefield.patch, 638 bytes (added by asvanberg@…, 18 years ago)

patch for DateTimeField

  • django/db/models/fields/__init__.py

     
    486486                    raise validators.ValidationError, gettext('Enter a valid date/time in YYYY-MM-DD HH:MM format.')
    487487
    488488    def pre_save(self, model_instance, add):
    489         value = super(DateTimeField, self).pre_save(model_instance, add)
     489        value = super(DateField, self).pre_save(model_instance, add)
    490490        if value is not None:
    491491            # MySQL will throw a warning if microseconds are given, because it
    492492            # doesn't support microseconds.
Back to Top