class documentation

class ProjectState:

View In Hierarchy

Represent the entire project's overall state. This is the item that is passed around - do it here rather than at the app level so that cross-app FKs/etc. resolve properly.
Class Method from​_apps Take an Apps and return a ProjectState matching it.
Method __eq__ Undocumented
Method __init__ Undocumented
Method ​_append​_option Undocumented
Method ​_find​_concrete​_model​_from​_proxy Undocumented
Method ​_find​_reload​_model Undocumented
Method ​_get​_concrete​_models​_mapping​_and​_proxy​_models Undocumented
Method ​_reload Undocumented
Method ​_remove​_option Undocumented
Method add​_constraint Undocumented
Method add​_field Undocumented
Method add​_index Undocumented
Method add​_model Undocumented
Method alter​_field Undocumented
Method alter​_model​_managers Undocumented
Method alter​_model​_options Undocumented
Method clear​_delayed​_apps​_cache Undocumented
Method clone Return an exact copy of this ProjectState.
Method get​_concrete​_model​_key Undocumented
Method reload​_model Undocumented
Method reload​_models Undocumented
Method remove​_constraint Undocumented
Method remove​_field Undocumented
Method remove​_index Undocumented
Method remove​_model Undocumented
Method rename​_field Undocumented
Method rename​_model Undocumented
Method resolve​_fields​_and​_relations Undocumented
Method resolve​_model​_field​_relations Undocumented
Method resolve​_model​_relations Undocumented
Method update​_model​_field​_relation Undocumented
Instance Variable ​_relations Undocumented
Instance Variable is​_delayed Undocumented
Instance Variable models Undocumented
Instance Variable real​_apps Undocumented
Property apps Undocumented
Property relations Undocumented
@classmethod
def from_apps(cls, apps):
Take an Apps and return a ProjectState matching it.
def __eq__(self, other):

Undocumented

def __init__(self, models=None, real_apps=None):

Undocumented

def _append_option(self, app_label, model_name, option_name, obj):

Undocumented

def _find_concrete_model_from_proxy(self, proxy_models, model_state):

Undocumented

def _find_reload_model(self, app_label, model_name, delay=False):

Undocumented

def _get_concrete_models_mapping_and_proxy_models(self):

Undocumented

def _reload(self, related_models):

Undocumented

def _remove_option(self, app_label, model_name, option_name, obj_name):

Undocumented

def add_constraint(self, app_label, model_name, constraint):

Undocumented

def add_field(self, app_label, model_name, name, field, preserve_default):

Undocumented

def add_index(self, app_label, model_name, index):

Undocumented

def add_model(self, model_state):

Undocumented

def alter_field(self, app_label, model_name, name, field, preserve_default):

Undocumented

def alter_model_managers(self, app_label, model_name, managers):

Undocumented

def alter_model_options(self, app_label, model_name, options, option_keys=None):

Undocumented

def clear_delayed_apps_cache(self):

Undocumented

def clone(self):
Return an exact copy of this ProjectState.
def get_concrete_model_key(self, model):

Undocumented

def reload_model(self, app_label, model_name, delay=False):

Undocumented

def reload_models(self, models, delay=True):

Undocumented

def remove_constraint(self, app_label, model_name, constraint_name):

Undocumented

def remove_field(self, app_label, model_name, name):

Undocumented

def remove_index(self, app_label, model_name, index_name):

Undocumented

def remove_model(self, app_label, model_name):

Undocumented

def rename_field(self, app_label, model_name, old_name, new_name):

Undocumented

def rename_model(self, app_label, old_name, new_name):

Undocumented

def resolve_fields_and_relations(self):

Undocumented

def resolve_model_field_relations(self, model_key, field_name, field, concretes=None):

Undocumented

def resolve_model_relations(self, model_key, concretes=None):

Undocumented

def update_model_field_relation(self, model, model_key, field_name, field, concretes):

Undocumented

_relations =

Undocumented

is_delayed: bool =

Undocumented

models =

Undocumented

real_apps =

Undocumented

@cached_property
apps =

Undocumented

@property
relations =

Undocumented