Jul 14 - Using CDN - Phase 1

This commit is contained in:
2026-07-14 11:49:25 -04:00
parent 42f9e4670c
commit bab564c23e
9 changed files with 180 additions and 30 deletions
+5
View File
@@ -106,6 +106,11 @@ def create_app(config_name='default'):
app.jinja_env.globals['sla_hours_remaining'] = sla_hours_remaining
app.jinja_env.globals['SLA_HOURS'] = SLA_HOURS
# Photo URL resolver — routes through the active storage backend so templates
# work unchanged when the backend flips from local to R2 (see utils/storage.py).
from app.utils import storage as _storage
app.jinja_env.globals['media_url'] = _storage.media_url
# ── Inject unread notification count into every template context ──────
# This powers the red badge on the navbar bell icon without requiring
# individual routes to pass the count manually.