mirror of
https://github.com/Balshgit/different
synced 2025-09-11 02:50:41 +03:00
14 lines
325 B
Python
14 lines
325 B
Python
import pkgutil
|
|
from pathlib import Path
|
|
|
|
|
|
def load_all_models() -> None:
|
|
"""Load all models from this folder."""
|
|
root_dir = Path(__file__).resolve().parent
|
|
modules = pkgutil.walk_packages(
|
|
path=[str(root_dir)],
|
|
prefix="db.models.",
|
|
)
|
|
for module in modules:
|
|
__import__(module.name)
|