MCPcopy
hub / github.com/django/django / clone

Method clone

django/db/models/fields/__init__.py:706–712  ·  view source on GitHub ↗

Uses deconstruct() to clone a new copy of this Field. Will not preserve any class attachments/attribute names.

(self)

Source from the content-addressed store, hash-verified

704 return (self.name, path, [], keywords)
705
706 def clone(self):
707 """
708 Uses deconstruct() to clone a new copy of this Field.
709 Will not preserve any class attachments/attribute names.
710 """
711 name, path, args, kwargs = self.deconstruct()
712 return self.__class__(*args, **kwargs)
713
714 def __eq__(self, other):
715 # Needed for @total_ordering

Callers 2

checkMethod · 0.45
get_fallback_sqlMethod · 0.45

Calls 1

deconstructMethod · 0.95

Tested by

no test coverage detected