๐๐ฟ๐ผ๐๐๐ฒ๐ฟ ๐ฃ๐๐๐ต ๐ก๐ผ๐๐ถ๐ณ๐ถ๐ฐ๐ฎ๐๐ถ๐ผ๐ป๐ ๐ณ๐ผ๐ฟ ๐๐ท๐ฎ๐ป๐ด๐ผ
You want alerts for your website feedback. Email servers cost money. Your inbox fills with spam. Browser push notifications solve this. They send alerts to your desktop. They work even when your admin tab is closed.
The setup uses these tools:
- pywebpush for server communication.
- py-vapid for security keys.
- Huey for background tasks.
- HTTPS for secure connections.
The process is simple:
- You subscribe in your browser.
- Django stores your subscription ID.
- A visitor submits a feedback form.
- Huey triggers a background task.
- The push service sends the alert.
- A service worker shows the notification on your OS.
Follow these tips for better results:
- Give a reason for the alert. This raises opt-in rates to 60%.
- Keep messages under 120 characters. OS systems cut long text.
- Use generic alerts for private data. Say You have a new message.
- Set a short time to live for messages.
Web push alerts are great for SaaS projects. Use them for new comments or replies.
Source: https://dev.to/djangotricks/browser-push-notifications-for-a-django-website-4obd