Last active
August 17, 2018 04:57
-
-
Save mayait/aa683ab1cd673ebbbaf153409cdce2a0 to your computer and use it in GitHub Desktop.
Send web push notifications from Django 2 using onesignal. URL configuration to render one Signal SDK as static files.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.views.generic import TemplateView | |
# Onesignal | |
# TemplateView will render this files as static content | |
urlpatterns += [ | |
path('manifest.json', TemplateView.as_view(template_name='onesignal/manifest.json', content_type='application/json')), | |
path('OneSignalSDKWorker.js', TemplateView.as_view(template_name='onesignal/OneSignalSDKWorker.js', content_type='application/x-javascript')), | |
path('OneSignalSDKWorker.js', TemplateView.as_view(template_name='onesignal/OneSignalSDKWorker.js', content_type='application/x-javascript')), | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment