Loading django/db/models/fields/__init__.py +8 −0 Original line number Diff line number Diff line Loading @@ -240,6 +240,14 @@ class Field(object): keywords, ) def clone(self): """ Uses deconstruct() to clone a new copy of this Field. Will not preserve any class attachments/attribute names. """ name, path, args, kwargs = self.deconstruct() return self.__class__(*args, **kwargs) def __eq__(self, other): # Needed for @total_ordering if isinstance(other, Field): Loading Loading
django/db/models/fields/__init__.py +8 −0 Original line number Diff line number Diff line Loading @@ -240,6 +240,14 @@ class Field(object): keywords, ) def clone(self): """ Uses deconstruct() to clone a new copy of this Field. Will not preserve any class attachments/attribute names. """ name, path, args, kwargs = self.deconstruct() return self.__class__(*args, **kwargs) def __eq__(self, other): # Needed for @total_ordering if isinstance(other, Field): Loading