Ticket #7801: date_time_metaclass.diff
File date_time_metaclass.diff, 1.0 KB (added by , 16 years ago) |
---|
-
django/db/models/fields/__init__.py
528 528 return [oldforms.CommaSeparatedIntegerField] 529 529 530 530 class DateField(Field): 531 from django.db.models.fields.subclassing import SubfieldBase 532 __metaclass__ = SubfieldBase 533 531 534 empty_strings_allowed = False 532 535 def __init__(self, verbose_name=None, name=None, auto_now=False, auto_now_add=False, **kwargs): 533 536 self.auto_now, self.auto_now_add = auto_now, auto_now_add … … 1081 1084 return super(TextField, self).formfield(**defaults) 1082 1085 1083 1086 class TimeField(Field): 1087 from django.db.models.fields.subclassing import SubfieldBase 1088 __metaclass__ = SubfieldBase 1089 1084 1090 empty_strings_allowed = False 1085 1091 def __init__(self, verbose_name=None, name=None, auto_now=False, auto_now_add=False, **kwargs): 1086 1092 self.auto_now, self.auto_now_add = auto_now, auto_now_add