Initial commit

This commit is contained in:
ThePetrovich 2026-08-17 22:50:10 +08:00
commit 5cda7bc309
28 changed files with 1173 additions and 0 deletions

View file

@ -0,0 +1,17 @@
from __future__ import annotations
from django.conf import settings
from django.utils import timezone
#: Quick-pick zones for the navbar switcher; override with YKSA_COMMON_TIMEZONES.
DEFAULT_COMMON_TIMEZONES = ["UTC", "Europe/Moscow", "Asia/Yakutsk", "Asia/Tokyo"]
def ui_preferences(request):
return {
"current_timezone_name": timezone.get_current_timezone_name(),
"common_timezones": getattr(
settings, "YKSA_COMMON_TIMEZONES", DEFAULT_COMMON_TIMEZONES
),
"cookie_consent": request.COOKIES.get("yksa_cookie_consent", ""),
}