docs: миграция на tgFlaskForm и производительность Flask; контур flask_app; UI без лишних описаний

Made-with: Cursor
This commit is contained in:
Константин Лебединский
2026-04-27 18:43:51 +05:00
parent 47279c72e3
commit b3e3757a92
20 changed files with 680 additions and 115 deletions
+29
View File
@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
import os
import secrets
from flask import Flask, jsonify
def create_app() -> Flask:
app = Flask(
__name__,
instance_relative_config=True,
template_folder='templates',
static_folder='static',
static_url_path='/static',
)
sk = (os.environ.get('SECRET_KEY') or '').strip()
app.config['SECRET_KEY'] = sk or secrets.token_hex(32)
@app.route('/health')
def health():
return jsonify(status='ok', service='testing-flask-app')
@app.route('/')
def index():
from flask import render_template
return render_template('index.html')
return app
View File
+9
View File
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Тестирование</title>
</head>
<body></body>
</html>