mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
add aurweb.time module
This module includes timezone-based utilities for a FastAPI request. This commit introduces use of the AURTZ cookie within get_request_timezone. This cookie should be set to the user or session's timezone. * `make_context` has been modified to parse the request's timezone and include the "timezone" and "timezones" variables, along with a timezone specified "now" date. + Added `Timezone` attribute to aurweb.testing.requests.Request.user. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
07d5907ecd
commit
9052688ed2
4 changed files with 104 additions and 4 deletions
|
@ -5,6 +5,7 @@ class User:
|
|||
""" A fake User model. """
|
||||
# Fake columns.
|
||||
LangPreference = aurweb.config.get("options", "default_lang")
|
||||
Timezone = aurweb.config.get("options", "default_timezone")
|
||||
|
||||
# A fake authenticated flag.
|
||||
authenticated = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue