MCPcopy
hub / github.com/django/django / state_forwards

Method state_forwards

django/db/migrations/operations/models.py:85–95  ·  view source on GitHub ↗
(self, app_label, state)

Source from the content-addressed store, hash-verified

83 return (self.__class__.__qualname__, [], kwargs)
84
85 def state_forwards(self, app_label, state):
86 state.add_model(
87 ModelState(
88 app_label,
89 self.name,
90 list(self.fields),
91 dict(self.options),
92 tuple(self.bases),
93 list(self.managers),
94 )
95 )
96
97 def database_forwards(self, app_label, schema_editor, from_state, to_state):
98 model = to_state.apps.get_model(app_label, self.name)

Calls 2

ModelStateClass · 0.90
add_modelMethod · 0.80