Coverage for apps / core / context_processors.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-05-02 13:22 +0000

1"""Template context processors for global template variables.""" 

2 

3from django.conf import settings 

4 

5 

6def app_context(request): 

7 """Provide auth_mode, version, and current profile theme to all templates.""" 

8 profile = getattr(request, "profile", None) 

9 return { 

10 "auth_mode": settings.AUTH_MODE, 

11 "cookie_version": settings.COOKIE_VERSION, 

12 "current_profile_theme": profile.theme if profile else "light", 

13 } 

← Back to Dashboard