diff --git a/src/invenflask/app.py b/src/invenflask/app.py index f5b0e93..46c1343 100644 --- a/src/invenflask/app.py +++ b/src/invenflask/app.py @@ -1,6 +1,7 @@ import os import sqlite3 from pathlib import Path +from importlib.metadata import version import pandas as pd from flask import (Flask, flash, g, redirect, render_template, request, @@ -25,6 +26,11 @@ # print(app.config) +@app.context_processor +def get_version(): + return dict(app_version=version("invenflask")) + + def get_db_connection(): conn = sqlite3.connect('database.db') conn.row_factory = sqlite3.Row diff --git a/src/invenflask/templates/base.html b/src/invenflask/templates/base.html index f2b7b51..bfbf4ca 100644 --- a/src/invenflask/templates/base.html +++ b/src/invenflask/templates/base.html @@ -74,5 +74,11 @@ {{ bootstrap.load_js() }} - + \ No newline at end of file