38188-vm/core/context_processors.py
Flatlogic Bot e083afc1d5 Mock 2
2026-02-04 16:40:09 +00:00

16 lines
541 B
Python

import os
import time
# Calculate once when the module is loaded (e.g. at server start)
DEPLOYMENT_TIMESTAMP = int(time.time())
def project_context(request):
"""
Adds project-specific environment variables to the template context globally.
"""
return {
"project_description": os.getenv("PROJECT_DESCRIPTION", ""),
"project_image_url": os.getenv("PROJECT_IMAGE_URL", ""),
# Used for cache-busting static assets - stable until server restart
"deployment_timestamp": DEPLOYMENT_TIMESTAMP,
}