Ticket #5505: db-models-fields-init.patch

File db-models-fields-init.patch, 658 bytes (added by danlarkin, 17 years ago)
  • django/db/models/fields/__init__.py

     
     1import copy
    12import datetime
    23import os
    34import time
     
    398399        "Returns the value of this field in the given model instance."
    399400        return getattr(obj, self.attname)
    400401
     402    def __deepcopy__(self,memo):
     403        result = copy.copy(self)
     404        memo[id(self)] = result
     405        return result
     406
    401407class AutoField(Field):
    402408    empty_strings_allowed = False
    403409    def __init__(self, *args, **kwargs):
Back to Top