- Add custom error pages (404, 403, 500) with user-friendly messages
- Add flash message system with signed cookies for security
- Add toast notifications with auto-dismiss and manual close
- Add comprehensive SEO meta tags (description, keywords, OG, Twitter)
- Add canonical URLs for SEO
- Update routes to use slug-based URLs (/posts/{slug} instead of /posts/{id})
- Add Open Graph and Twitter Card meta tags for social sharing
- Add favicon SVG
- Update all templates with proper meta tags and URLs
- Add error handlers registration in main.py
- Add flash middleware for request handling
- Install itsdangerous dependency
79 lines
1.4 KiB
TOML
79 lines
1.4 KiB
TOML
[project]
|
|
name = "blog"
|
|
version = "0.1.0"
|
|
description = "Add your description here"
|
|
readme = "README.md"
|
|
requires-python = ">=3.13"
|
|
dependencies = [
|
|
"fastapi>=0.136.0",
|
|
"pydantic>=2.13.2",
|
|
"pydantic-settings>=2.14.0",
|
|
"uvicorn>=0.44.0",
|
|
"sqlalchemy>=2.0.0",
|
|
"aiosqlite>=0.21.0",
|
|
"asyncpg>=0.30.0",
|
|
"dishka>=1.5.0",
|
|
"httpx>=0.28.0",
|
|
"jinja2>=3.1.6",
|
|
"itsdangerous>=2.2.0",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["app"]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
{include-group = "lints"},
|
|
{include-group = "tests"},
|
|
{include-group = "types"},
|
|
"pre-commit>=4.5.1",
|
|
]
|
|
tests = [
|
|
"httpx>=0.28.1",
|
|
"mimesis>=19.1.0",
|
|
"pytest>=9.0.3",
|
|
"pytest-asyncio>=1.3.0",
|
|
"pytest-cov>=7.1.0",
|
|
]
|
|
lints = [
|
|
"black>=23.7.0",
|
|
"ruff>=0.15.11",
|
|
"isort>=8.0.1",
|
|
]
|
|
types = [
|
|
"mimesis>=19.1.0",
|
|
"mypy>=1.20.1",
|
|
]
|
|
|
|
[project.scripts]
|
|
blog = "app.main:main"
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = "auto"
|
|
asyncio_default_fixture_loop_scope = "function"
|
|
addopts = "--cov=app --cov-report=term-missing --cov-report=html"
|
|
pythonpath = "."
|
|
testpaths = "tests"
|
|
xfail_strict = true
|
|
|
|
[tool.mypy]
|
|
strict = true
|
|
plugins = ["pydantic.mypy"]
|
|
|
|
[tool.ruff]
|
|
target-version = "py313"
|
|
line-length = 100
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "W", "B", "C4", "SIM"]
|
|
ignore = ["E501"]
|
|
|
|
[tool.isort]
|
|
profile = "black"
|
|
filter_files = true
|
|
|