fix web: имя бота в Login Widget читается динамически
| | |
| | | from aiohttp import web |
| | | |
| | | import db |
| | | from cfg import BOT_USERNAME, OWNER_ID, WEB_ADMINS, WEB_BASE_URL, bot |
| | | import cfg |
| | | from cfg import OWNER_ID, WEB_ADMINS, WEB_BASE_URL, bot |
| | | from util import now_ts |
| | | from web.render import render |
| | | |
| | |
| | | |
| | | |
| | | async def login_page(request) -> web.Response: |
| | | # Имя бота читаем динамически: оно заполняется на старте в load_bot_username(). |
| | | if not cfg.BOT_USERNAME: |
| | | await cfg.load_bot_username() |
| | | return render( |
| | | request, |
| | | "login.html", |
| | | bot_username=BOT_USERNAME, |
| | | bot_username=cfg.BOT_USERNAME, |
| | | auth_url=base_url(request) + "/auth/telegram", |
| | | ) |
| | | |