Large uncommitted body of work accumulated across sessions on this branch -- committing as a checkpoint so it's tracked and future worktree-isolated agents see the real codebase instead of a stale ancestor commit. Covers the management app's dedicated Tailwind theme and templates, the club onboarding requirement/signup workflow (club/services/onboarding.py, requirement/status models, sign-up dashboard), fee/status auto-activation decoupling, referee management, and the new events calendar grid service layer. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ECGMEwrc2k4D8VQuwjstj9
17 lines
665 B
Python
17 lines
665 B
Python
"""So the command bar's status indicator (base.html) can reflect real job health on every
|
|
control panel page, not just the dashboard, without every view remembering to pass it.
|
|
|
|
Guarded to controlpanel pages only -- unlike features.context_processors.maintenance (a
|
|
cached read, cheap anywhere), this runs a real query, and every other page on the platform
|
|
(club subdomains, the public site) has no command bar to show it on.
|
|
"""
|
|
|
|
from .services.jobs import recent_job_failures
|
|
|
|
|
|
def job_health(request):
|
|
if not (request.resolver_match and request.resolver_match.app_name == "controlpanel"):
|
|
return {}
|
|
|
|
return {"failed_jobs": recent_job_failures()}
|