2020-07-31 09:39:25 +00:00
|
|
|
from os.path import abspath, join
|
|
|
|
|
|
|
|
from .conf import get_setting
|
|
|
|
|
2022-01-24 04:07:52 +00:00
|
|
|
__author__ = "Artur Barseghyan"
|
2023-03-23 01:36:58 +00:00
|
|
|
__copyright__ = "2013-2023 Artur Barseghyan"
|
2022-01-24 04:07:52 +00:00
|
|
|
__license__ = "MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later"
|
2020-07-31 09:39:25 +00:00
|
|
|
__all__ = (
|
2022-01-24 04:07:52 +00:00
|
|
|
"project_dir",
|
|
|
|
"PROJECT_DIR",
|
2020-07-31 09:39:25 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
def project_dir(base: str) -> str:
|
|
|
|
"""Project dir."""
|
2022-01-24 04:07:52 +00:00
|
|
|
tld_names_local_path_parent = get_setting("NAMES_LOCAL_PATH_PARENT")
|
|
|
|
return abspath(join(tld_names_local_path_parent, base).replace("\\", "/"))
|
2020-07-31 09:39:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
PROJECT_DIR = project_dir
|