feat: pwa notifications
This commit is contained in:
@@ -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,
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user