FastAPI + Jinja2 + MariaDB web application with registration, login, profile, password reset, and email confirmation flows. All UI in Russian. Styled with Evotor brand colors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
23 lines
715 B
Python
23 lines
715 B
Python
from fastapi import FastAPI
|
|
from fastapi.staticfiles import StaticFiles
|
|
from starlette.middleware.sessions import SessionMiddleware
|
|
|
|
from web.config import settings
|
|
from web.database import engine, Base
|
|
from web.models import User # noqa: F401 — registers model with Base
|
|
from web.routes import auth, profile, reset
|
|
|
|
app = FastAPI(title="EvoSync — Личный кабинет")
|
|
|
|
app.add_middleware(SessionMiddleware, secret_key=settings.SECRET_KEY)
|
|
app.mount("/static", StaticFiles(directory="web/static"), name="static")
|
|
|
|
app.include_router(auth.router)
|
|
app.include_router(profile.router)
|
|
app.include_router(reset.router)
|
|
|
|
|
|
@app.on_event("startup")
|
|
def on_startup():
|
|
Base.metadata.create_all(bind=engine)
|