feat: pwa notifications

This commit is contained in:
2026-07-14 20:49:30 +02:00
parent 2cf7b283e0
commit 5198826f83
21 changed files with 1563 additions and 8 deletions
+3
View File
@@ -1,6 +1,7 @@
from datetime import timedelta
from typing import Optional
from django.conf import settings
from django.contrib import messages
from django.contrib.admin.views.decorators import staff_member_required
from django.shortcuts import redirect, render
@@ -103,5 +104,7 @@ def today(request):
"next_date": day + timedelta(days=1),
"chart": build_chart(readings),
"reading_count": len(readings),
# Empty when push is not configured; the page then hides the card.
"vapid_public_key": settings.VAPID_PUBLIC_KEY,
},
)