Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions push_notifications/conf/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ def _validate_wp_config(self, application_id, application_config):
"OPERA": "https://fcm.googleapis.com/fcm/send",
"EDGE": "https://wns2-par02p.notify.windows.com/w",
"FIREFOX": "https://updates.push.services.mozilla.com/wpush/v2",
"SAFARI": "https://web.push.apple.com",
})

def _validate_allowed_settings(self, application_id, application_config, allowed_settings):
Expand Down
18 changes: 18 additions & 0 deletions push_notifications/migrations/0012_alter_webpushdevice_browser.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.1.7 on 2025-06-16 11:16

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('push_notifications', '0011_alter_apnsdevice_registration_id'),
]

operations = [
migrations.AlterField(
model_name='webpushdevice',
name='browser',
field=models.CharField(choices=[('CHROME', 'Chrome'), ('FIREFOX', 'Firefox'), ('OPERA', 'Opera'), ('EDGE', 'Edge'), ('SAFARI', 'Safari')], default='CHROME', help_text='Currently only support to Chrome, Firefox, Edge, Safari and Opera browsers', max_length=10, verbose_name='Browser'),
),
]
5 changes: 3 additions & 2 deletions push_notifications/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
("CHROME", "Chrome"),
("FIREFOX", "Firefox"),
("OPERA", "Opera"),
("EDGE", "Edge")
("EDGE", "Edge"),
("SAFARI", "Safari")
)


Expand Down Expand Up @@ -261,7 +262,7 @@ class WebPushDevice(Device):
browser = models.CharField(
verbose_name=_("Browser"), max_length=10,
choices=BROWSER_TYPES, default=BROWSER_TYPES[0][0],
help_text=_("Currently only support to Chrome, Firefox, Edge and Opera browsers")
help_text=_("Currently only support to Chrome, Firefox, Edge, Safari and Opera browsers")
)
objects = WebPushDeviceManager()

Expand Down
1 change: 1 addition & 0 deletions push_notifications/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"OPERA": PUSH_NOTIFICATIONS_SETTINGS["FCM_POST_URL"],
"FIREFOX": "https://updates.push.services.mozilla.com/wpush/v2",
"EDGE": "https://wns2-par02p.notify.windows.com/w",
"SAFARI": "https://web.push.apple.com",
})
PUSH_NOTIFICATIONS_SETTINGS.setdefault("WP_PRIVATE_KEY", None)
PUSH_NOTIFICATIONS_SETTINGS.setdefault("WP_CLAIMS", None)
Expand Down
Loading