add the request parameter to render_template

This allows us to inspect things about the request we're rendering from.

* Use render_template(request, ...) in aurweb.routers.auth

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-01-08 20:24:22 -08:00
parent 5d4a5deddf
commit 4423326cec
4 changed files with 12 additions and 6 deletions

View file

@ -17,7 +17,7 @@ def login_template(request: Request, next: str, errors: list = None):
context = make_context(request, "Login", next)
context["errors"] = errors
context["url_base"] = f"{request.url.scheme}://{request.url.netloc}"
return render_template("login.html", context)
return render_template(request, "login.html", context)
@router.get("/login", response_class=HTMLResponse)