feat: pass request as first positional arg to all TemplateResponse calls across routers

The diff shows a systematic refactor across 14 router files and main.py where every invocation of `templates.TemplateResponse` now receives the `request` object as its first positional argument, shifting the template name from first to second position. This change touches 30+ call sites in auth, feed, gists, messages, news, notifications, posts, profile, projects, services, bugs, admin, and the main error handlers, ensuring consistent Jinja2 template rendering with explicit request context injection for all HTTP responses.
This commit is contained in:
2026-05-13 21:03:06 +00:00
parent e0cd7bd309
commit a38fecedac
13 changed files with 29 additions and 29 deletions
+2 -2
View File
@@ -66,7 +66,7 @@ async def gists_page(request: Request, language: str = None, user_uid: str = Non
],
schemas=[website_schema(base)],
)
return templates.TemplateResponse("gists.html", {
return templates.TemplateResponse(request, "gists.html", {
**seo_ctx,
"request": request,
"user": user,
@@ -110,7 +110,7 @@ async def gist_detail(request: Request, gist_slug: str):
],
schemas=[website_schema(base)],
)
return templates.TemplateResponse("gist_detail.html", {
return templates.TemplateResponse(request, "gist_detail.html", {
**seo_ctx,
"request": request,
"user": user,