From c558eb14163c4d767107006c729a45c0ecd466f0 Mon Sep 17 00:00:00 2001 From: ackFromRedmi Date: Thu, 16 Apr 2026 23:20:40 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BC=D0=B5=D0=BD=D1=8F=D0=BB=20?= =?UTF-8?q?=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D1=81=D0=B8?= =?UTF-8?q?=D1=81=D1=82=D0=B5=D0=BC=D1=8B=20=D0=B2=20=D1=84=D1=83=D1=82?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=20=D0=B8=20=D0=B2=D0=B2=D0=B5=D0=BB=20=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D1=81=D0=B8=D0=BE=D0=BD=D0=BD=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D1=8C=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TODO.md | 3 +++ core/settings.py | 1 + shiftflow/templatetags/__init__.py | 0 shiftflow/templatetags/app_meta.py | 9 +++++++++ templates/components/_footer.html | 4 +++- 5 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 shiftflow/templatetags/__init__.py create mode 100644 shiftflow/templatetags/app_meta.py diff --git a/TODO.md b/TODO.md index d7000ee..485f22a 100644 --- a/TODO.md +++ b/TODO.md @@ -13,6 +13,9 @@ ## Доступы (UI) - Доработать видимость и действия для разных ролей/цехов: фильтрация по allowed_workshops, замещение, read-only руководитель. +## Горячие клавиши (UI) +- Унифицировать shortcuts по приложению (Enter/Esc и др.): сохранить/назад/сброс фильтров, поведение в модалках, кроссбраузерность. + ## Списание (UI) - Доработать страницу «Списание»: фильтры, удобная сводка по материалам/изделиям и отметка «внесено в 1С». diff --git a/core/settings.py b/core/settings.py index bfcda8e..ee3e185 100644 --- a/core/settings.py +++ b/core/settings.py @@ -30,6 +30,7 @@ if os.path.exists(env_file): # читаем переменную окружения ENV_TYPE = os.getenv('ENV_TYPE', 'local') +APP_VERSION = '0.7.1' # Настройки безопасности # DEBUG будет True везде, кроме сервера diff --git a/shiftflow/templatetags/__init__.py b/shiftflow/templatetags/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/shiftflow/templatetags/app_meta.py b/shiftflow/templatetags/app_meta.py new file mode 100644 index 0000000..e015deb --- /dev/null +++ b/shiftflow/templatetags/app_meta.py @@ -0,0 +1,9 @@ +from django import template +from django.conf import settings + +register = template.Library() + + +@register.simple_tag +def app_version() -> str: + return str(getattr(settings, 'APP_VERSION', '0.0.0')) \ No newline at end of file diff --git a/templates/components/_footer.html b/templates/components/_footer.html index 010ef4c..d8742d6 100644 --- a/templates/components/_footer.html +++ b/templates/components/_footer.html @@ -1,8 +1,10 @@ +{% load app_meta %}