Ticket #7801: date_time_metaclass.diff

File date_time_metaclass.diff, 1.0 KB (added by Andrew Magee <amagee@…>, 16 years ago)

my fix

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

     
    528528        return [oldforms.CommaSeparatedIntegerField]
    529529
    530530class DateField(Field):
     531    from django.db.models.fields.subclassing import SubfieldBase
     532    __metaclass__ = SubfieldBase
     533
    531534    empty_strings_allowed = False
    532535    def __init__(self, verbose_name=None, name=None, auto_now=False, auto_now_add=False, **kwargs):
    533536        self.auto_now, self.auto_now_add = auto_now, auto_now_add
     
    10811084        return super(TextField, self).formfield(**defaults)
    10821085
    10831086class TimeField(Field):
     1087    from django.db.models.fields.subclassing import SubfieldBase
     1088    __metaclass__ = SubfieldBase
     1089
    10841090    empty_strings_allowed = False
    10851091    def __init__(self, verbose_name=None, name=None, auto_now=False, auto_now_add=False, **kwargs):
    10861092        self.auto_now, self.auto_now_add = auto_now, auto_now_add
Back to Top