Early initialisation of Tortoise ORM Models. Initialise the relationships between Models. This does not initialise any database connection. :param models_paths: Models paths to initialise :param app_label: The app label, e.g. 'models' :param _init_r
(
cls,
models_paths: Iterable[ModuleType | str],
app_label: str,
_init_relations: bool = True,
)
| 211 | |
| 212 | @classmethod |
| 213 | def init_models( |
| 214 | cls, |
| 215 | models_paths: Iterable[ModuleType | str], |
| 216 | app_label: str, |
| 217 | _init_relations: bool = True, |
| 218 | ) -> None: |
| 219 | """ |
| 220 | Early initialisation of Tortoise ORM Models. |
| 221 | |
| 222 | Initialise the relationships between Models. |
| 223 | This does not initialise any database connection. |
| 224 | |
| 225 | :param models_paths: Models paths to initialise |
| 226 | :param app_label: The app label, e.g. 'models' |
| 227 | :param _init_relations: Whether to init relations or not |
| 228 | |
| 229 | :raises ConfigurationError: If models are invalid. |
| 230 | """ |
| 231 | cls.init_app(app_label, models_paths, _init_relations=_init_relations) |
| 232 | |
| 233 | @classmethod |
| 234 | def init_app( |