class documentation

class StateApps(Apps): (source)

View In Hierarchy

Subclass of the global Apps registry class to better handle dynamic model additions and removals.

Method __init__ Undocumented
Method bulk_update Undocumented
Method clone Return a clone of this registry.
Method register_model Undocumented
Method render_multiple Undocumented
Method unregister_model Undocumented
Instance Variable ready Undocumented
Instance Variable ready_event Undocumented
Instance Variable real_models Undocumented
Instance Variable _lock Undocumented

Inherited from Apps:

Method check_apps_ready Raise an exception if all apps haven't been imported yet.
Method check_models_ready Raise an exception if all models haven't been imported yet.
Method clear_cache Clear all internal caches, for methods that alter the app registry.
Method do_pending_operations Take a newly-prepared model and pass it to each function waiting for it. This is called at the very end of Apps.register_model().
Method get_app_config Import applications and returns an app config for the given label.
Method get_app_configs Import applications and return an iterable of app configs.
Method get_containing_app_config Look for an app config containing a given object.
Method get_model Return the model matching the given app_label and model_name.
Method get_models Return a list of all installed models.
Method get_registered_model Similar to get_model(), but doesn't require that an app exists with the given app_label.
Method get_swappable_settings_name For a given model string (e.g. "auth.User"), return the name of the corresponding settings name if it refers to a swappable model. If the referred model is not swappable, return None.
Method is_installed Check whether an application with this name exists in the registry.
Method lazy_model_operation Take a function and a number of ("app_label", "modelname") tuples, and when all the corresponding models have been imported and registered, call the function with the model classes as its arguments.
Method populate Load application configurations and models.
Method set_available_apps Restrict the set of installed apps used by get_app_config[s].
Method set_installed_apps Enable a different set of installed apps for get_app_config[s].
Method unset_available_apps Cancel a previous call to set_available_apps().
Method unset_installed_apps Cancel a previous call to set_installed_apps().
Instance Variable all_models Undocumented
Instance Variable app_configs Undocumented
Instance Variable apps_ready Undocumented
Instance Variable loading Undocumented
Instance Variable models_ready Undocumented
Instance Variable stored_app_configs Undocumented
Instance Variable _pending_operations Undocumented
def __init__(self, real_apps, models, ignore_swappable=False): (source)

Undocumented

@contextmanager
def bulk_update(self): (source)

Undocumented

def clone(self): (source)

Return a clone of this registry.

def register_model(self, app_label, model): (source)
def render_multiple(self, model_states): (source)

Undocumented

def unregister_model(self, app_label, model_name): (source)

Undocumented

real_models: list = (source)

Undocumented