This commit is contained in:
Kseninia Mikhaylova 2024-11-19 13:51:12 +03:00
parent 9e82178c66
commit 64c04ec812
1 changed files with 1 additions and 2 deletions

View File

@ -40,8 +40,7 @@ statuses = {
# Создаем кастомный фильтр для форматирования дат
def format_status(value):
res = statuses[str(value)] if hasattr(statuses, str(value)) else value
return res[0] if len(res) else value
return res
# Регистрируем фильтр в Jinja2Templates
templates.env.filters["format_status"] = format_status