Temporary backup from J621 porting

This commit is contained in:
JakeBreath
2026-08-03 00:31:33 -05:00
parent b1fd4fce60
commit f593d16ca4
43 changed files with 2163 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import time
from .os_utils import get_os_info
from django.conf import settings
def app_version(request):
os_icon, os_name = get_os_info()
page_gen_time = ''
if hasattr(request, '_start_time') and request._start_time:
elapsed = time.time() - request._start_time
page_gen_time = f"{elapsed * 1000:.0f}ms"
return {
'APP_ENV': 'dev' if settings.DEBUG else 'prod',
'GIT_COMMIT_HASH': getattr(settings, 'GIT_COMMIT_HASH', 'unknown'),
'OS_ICON': os_icon,
'OS_NAME': os_name,
'PAGE_GEN_TIME': page_gen_time,
}