Jul 14 - Using CDN - Phase 1
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user