Files
vesti/openspec/changes/archive/2026-09-13-web-format-datetime/tasks.md
T

17 lines
901 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 1. Фильтр
- [x] 1.1 Добавить `dt_filter` в `web/app.py` (datetime.fromisoformat → `%H:%M %d.%m.%Y`, безопасно к None/мусору)
- [x] 1.2 Зарегистрировать как `tpl.filters["dt"]`
## 2. Применение в шаблонах
- [x] 2.1 `candidates.html`: `{{ (p.published_at or '')[:16] }}` → `{{ p.published_at | dt }}`
- [x] 2.2 `published.html:10`: то же для `published_at`
- [x] 2.3 `metrics.html:23`: `{{ (r.started_at or '')[:16] }}` → `{{ r.started_at | dt }}`
- [x] 2.4 Проверка: `grep -rn "\[:16\]" web/templates/` — пусто
## 3. Проверка
- [x] 3.1 Дата в UI: `15:53 15.08.2026` (а не `2026-08-15T15:53`)
- [x] 3.2 None → пустая строка, страницы без ошибок
- [x] 3.3 Регресс: candidates/published/metrics рендерятся с новым форматом