Skip to content

Commit

Permalink
Print out proper version in app
Browse files Browse the repository at this point in the history
  • Loading branch information
not7cd committed Jan 2, 2025
1 parent cdc23a6 commit d9f2090
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion whois/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

from whois.settings.settings_template import AppSettings, MikrotikSettings

try:
from importlib.metadata import version
_version = version('whois')
except Exception:
_version = "unknown"


if not os.environ["SECRET_KEY"]:
raise ValueError("No SECRET_KEY set for Flask application")

Expand All @@ -12,7 +19,7 @@

app_settings = AppSettings(
SECRET_KEY=os.environ["SECRET_KEY"],
APP_VERSION="1.5.0",
APP_VERSION=_version,
APP_TITLE="👀 kto hakuje",
APP_NAME="Kto Hakuje",
APP_BASE_URL="whois.at.hsp.sh",
Expand Down

0 comments on commit d9f2090

Please sign in to comment.