You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

__init__.py 533 B

12345678910111213141516171819
  1. import os
  2. from pathlib import Path
  3. import config as cfg
  4. def app_root_dir(pvd: str) -> str:
  5. basedir = Path(os.path.abspath(os.path.dirname(__file__)))
  6. return os.path.join(basedir.parent, cfg.DIR_APP_ROOT, pvd)
  7. def resource_dir(pvd: str) -> str:
  8. basedir = Path(os.path.abspath(os.path.dirname(__file__)))
  9. return os.path.join(basedir.parent, cfg.DIR_RESOURCE, pvd)
  10. def template_dir() -> str:
  11. basedir = Path(os.path.abspath(os.path.dirname(__file__)))
  12. return os.path.join(basedir.parent, cfg.DIR_TEMPLATE)