diff --git a/.env.example b/.env.example
index df712a3..21128ef 100644
--- a/.env.example
+++ b/.env.example
@@ -2,6 +2,7 @@
WEB_APP_PORT=5000
# Application configuration
+PROJECT_VERSION=3.1.2
MAX_CONTENT_LENGTH=3145728
MAX_PENDING_TIME=600
MAX_STORE_TIME=259200
diff --git a/aperisolve/app.py b/aperisolve/app.py
index 92852ef..dbfc39f 100644
--- a/aperisolve/app.py
+++ b/aperisolve/app.py
@@ -36,6 +36,7 @@ def create_app() -> Flask:
app = Flask(__name__)
app.json.sort_keys = False # type: ignore
app.config["SQLALCHEMY_DATABASE_URI"] = os.environ.get("DB_URI")
+ app.config["PROJECT_VERSION"] = os.getenv("PROJECT_VERSION")
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
app.config["MAX_CONTENT_LENGTH"] = int(os.environ.get("MAX_CONTENT_LENGTH", 1024 * 1024))
app.config["REDIS_QUEUE"] = Queue(connection=Redis(host="redis", port=6379))
@@ -426,7 +427,13 @@ def create_app() -> Flask:
return abort(404, description="Image not found or unsupported format")
return send_file(output_file, as_attachment=True)
-
+
+ # Returns Current Year
+ @app.context_processor
+ def return_curr_year():
+ year = datetime.today().year
+ return{"year":year}
+
return app
diff --git a/aperisolve/templates/base.html b/aperisolve/templates/base.html
index 256251d..673e77b 100644
--- a/aperisolve/templates/base.html
+++ b/aperisolve/templates/base.html
@@ -18,7 +18,7 @@
Aperi'Solve
- v3.1.2
+ (v.{{ config["PROJECT_VERSION"] }})
{% block body_content %} {% endblock %}
diff --git a/aperisolve/templates/footer.html b/aperisolve/templates/footer.html
index 04a6b1d..0fbd048 100644
--- a/aperisolve/templates/footer.html
+++ b/aperisolve/templates/footer.html
@@ -2,7 +2,7 @@