mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(templates): import aurweb.auth.creds directly
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
c86f71a4b4
commit
e1543f2e91
1 changed files with 3 additions and 2 deletions
|
@ -14,9 +14,10 @@ import jinja2
|
||||||
from fastapi import Request
|
from fastapi import Request
|
||||||
from fastapi.responses import HTMLResponse
|
from fastapi.responses import HTMLResponse
|
||||||
|
|
||||||
|
import aurweb.auth.creds
|
||||||
import aurweb.config
|
import aurweb.config
|
||||||
|
|
||||||
from aurweb import auth, captcha, cookies, l10n, time, util
|
from aurweb import captcha, cookies, l10n, time, util
|
||||||
|
|
||||||
# Prepare jinja2 objects.
|
# Prepare jinja2 objects.
|
||||||
_loader = jinja2.FileSystemLoader(os.path.join(
|
_loader = jinja2.FileSystemLoader(os.path.join(
|
||||||
|
@ -107,7 +108,7 @@ def make_context(request: Request, title: str, next: str = None):
|
||||||
"now": datetime.now(tz=zoneinfo.ZoneInfo(timezone)),
|
"now": datetime.now(tz=zoneinfo.ZoneInfo(timezone)),
|
||||||
"utcnow": int(datetime.utcnow().timestamp()),
|
"utcnow": int(datetime.utcnow().timestamp()),
|
||||||
"config": aurweb.config,
|
"config": aurweb.config,
|
||||||
"creds": auth.creds,
|
"creds": aurweb.auth.creds,
|
||||||
"next": next if next else request.url.path
|
"next": next if next else request.url.path
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue