Ticket #13328: patch_13328.diff

File patch_13328.diff, 610 bytes (added by vbabiy, 11 years ago)

patch

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

    diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py
    index 281963f..9d75060 100644
    a b class DateField(Field): 
    592592            kwargs['blank'] = True
    593593        Field.__init__(self, verbose_name, name, **kwargs)
    594594
     595    def __getstate__(self):
     596        if type(datetime.datetime.now) == self.default:
     597            obj_dict = self.__dict__.copy()
     598            obj_dict['default'] = None
     599            return obj_dict
     600
    595601    def get_internal_type(self):
    596602        return "DateField"
    597603
Back to Top