diff --git a/appmes/settings.py b/appmes/settings.py index 38f18d7..529b2c8 100644 --- a/appmes/settings.py +++ b/appmes/settings.py @@ -29,6 +29,7 @@ SECRET_KEY = env('SECRET_KEY') # SECURITY WARNING: don't run with debug turned on in production! DEBUG = env('DEBUG') +VERSION = "1.0" ALLOWED_HOSTS = env.list("ALLOWED_HOSTS") ADMINS = env.list("ADMINS") @@ -112,7 +113,8 @@ 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', - 'market.context_processors.user_market' + 'market.context_processors.user_market', + 'core.context_processors.version_number', ], "loaders": default_loaders if DEBUG else cached_loaders, }, diff --git a/core/context_processors.py b/core/context_processors.py new file mode 100644 index 0000000..bb5eaf0 --- /dev/null +++ b/core/context_processors.py @@ -0,0 +1,5 @@ +from django.conf import settings + + +def version_number(request): + return {"VERSION_NUMBER": settings.VERSION} diff --git a/static/css/mes.scss b/static/css/mes.scss index da1faef..087d85b 100644 --- a/static/css/mes.scss +++ b/static/css/mes.scss @@ -250,4 +250,10 @@ html, body { height: 32px; margin: 0 8px; font-size: 32px; +} + +#version { + position: absolute; + bottom: 4px; + right: 4px; } \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 06a0147..47ebae2 100644 --- a/templates/base.html +++ b/templates/base.html @@ -36,6 +36,9 @@