diff --git a/ibms_project/settings.py b/ibms_project/settings.py index c9b8978..e5de0b8 100644 --- a/ibms_project/settings.py +++ b/ibms_project/settings.py @@ -3,6 +3,7 @@ import os from pathlib import Path import sys +import tomli # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = str(Path(__file__).resolve().parents[1]) @@ -80,7 +81,8 @@ ] SITE_TITLE = 'Integrated Business Management System' SITE_ACRONYM = 'IBMS' -APPLICATION_VERSION_NO = '2.8.1' +project = tomli.load(open(os.path.join(BASE_DIR, "pyproject.toml"), "rb")) +APPLICATION_VERSION_NO = project["tool"]["poetry"]["version"] MANAGERS = ( ('Zen Wee', 'zen.wee@dbca.wa.gov.au', '9219 9928'), ('Graham Holmes', 'graham.holmes@dbca.wa.gov.au', '9881 9212'), diff --git a/poetry.lock b/poetry.lock index d2c5603..68f3b91 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1102,4 +1102,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.11" -content-hash = "43e38af6037409a406058534ae80e44cd2d2a0ec21138eca7f1b3f0b339b4d9c" +content-hash = "9c25ce793e7877be7e6745b346d04a40f147634f14cb9c14d7c60cb003de9693" diff --git a/pyproject.toml b/pyproject.toml index 01a5795..c8b662a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,6 +23,7 @@ openpyxl = "3.1.2" webtemplate-dbca = "1.6.0" whitenoise = {version = "6.6.0", extras = ["brotli"]} mixer = "7.2.2" +tomli = "2.0.1" [tool.poetry.group.dev.dependencies] ipython = "^8.10.0"