diff --git a/CHANGELOG.md b/CHANGELOG.md index 88f79ad..c09bc51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ Section Order: ### Changed +- Better constant names - Code for the template tag has been improved ### Removed diff --git a/fleetpings/constants.py b/fleetpings/constants.py index 80b3d7f..7a24d7c 100644 --- a/fleetpings/constants.py +++ b/fleetpings/constants.py @@ -11,5 +11,5 @@ DISCORD_WEBHOOK_REGEX = r"https:\/\/discord\.com\/api\/webhooks\/[\d]+\/[a-zA-Z0-9_-]+$" -AA_FLEETPINGS_BASE_DIR = os.path.join(os.path.dirname(__file__)) -AA_FLEETPINGS_STATIC_DIR = os.path.join(AA_FLEETPINGS_BASE_DIR, "static", PACKAGE_NAME) +APP_BASE_DIR = os.path.join(os.path.dirname(__file__)) +APP_STATIC_DIR = os.path.join(APP_BASE_DIR, "static", PACKAGE_NAME) diff --git a/fleetpings/helper/static_files.py b/fleetpings/helper/static_files.py index 692578a..68aabe0 100644 --- a/fleetpings/helper/static_files.py +++ b/fleetpings/helper/static_files.py @@ -17,7 +17,7 @@ # AA Fleet Pings from fleetpings import __title__ -from fleetpings.constants import AA_FLEETPINGS_STATIC_DIR +from fleetpings.constants import APP_STATIC_DIR logger = LoggerAddTag(my_logger=get_extension_logger(__name__), prefix=__title__) @@ -34,7 +34,7 @@ def calculate_integrity_hash(relative_file_path: str) -> str: :rtype: str """ - file_path = os.path.join(AA_FLEETPINGS_STATIC_DIR, relative_file_path) + file_path = os.path.join(APP_STATIC_DIR, relative_file_path) integrity_hash = calculate_integrity(Path(file_path), Algorithm.SHA512) return integrity_hash