您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

25 行
683 B

  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 doc_root_dir() -> str:
  8. basedir = Path(os.path.abspath(os.path.dirname(__file__)))
  9. return os.path.join(basedir.parent, cfg.DIR_DOC_ROOT)
  10. def resource_dir(pvd: str) -> str:
  11. basedir = Path(os.path.abspath(os.path.dirname(__file__)))
  12. return os.path.join(basedir.parent, cfg.DIR_RESOURCE, pvd)
  13. def template_dir() -> str:
  14. basedir = Path(os.path.abspath(os.path.dirname(__file__)))
  15. return os.path.join(basedir.parent, cfg.DIR_TEMPLATE)