Show public document count and recent uploads on landing

This commit is contained in:
anor
2026-12-01 16:42:01 +10:00
parent 0af7330ecc
commit cdca408dbf
6 changed files with 254 additions and 0 deletions
+3
View File
@@ -1057,6 +1057,9 @@ async def index(request: Request):
# Объявление о пробном доступе на главной: число вопросов — из той же настройки, что
# и сам предел, иначе страница пообещает одно, а сервер откажет по другому.
html = html.replace("{{TRIAL_QUESTIONS}}", str(_trial_questions()))
# Только публичный нормативный корпус; чтение метаданных выполняем вне event loop.
import public_documents
html = html.replace("{{PUBLIC_DOCUMENTS}}", await asyncio.to_thread(public_documents.render))
return HTMLResponse(
html,
headers={