From ab8db72bd3aad26848276456aaba381de12e8926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Setti?= Date: Fri, 8 Feb 2019 02:20:26 -0200 Subject: [PATCH 1/2] Fix problem of multiple service workers being registered Source: https://stackoverflow.com/questions/33816342/how-to-prevent-the-same-service-worker-from-registering-over-multiple-pages --- pwa/templates/pwa.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwa/templates/pwa.html b/pwa/templates/pwa.html index b148acc..660763c 100644 --- a/pwa/templates/pwa.html +++ b/pwa/templates/pwa.html @@ -36,7 +36,7 @@ // Initialize the service worker if ('serviceWorker' in navigator) { navigator.serviceWorker.register('/serviceworker.js', { - scope: '.' + scope: '/' }).then(function (registration) { // Registration was successful console.log('django-pwa: ServiceWorker registration successful with scope: ', registration.scope); From d687b0c0472c0b5627f144687031b7f6d7d93112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Setti?= Date: Sat, 9 Feb 2019 01:37:58 -0200 Subject: [PATCH 2/2] Fixed tests --- tests/test_template_tag_meta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_template_tag_meta.py b/tests/test_template_tag_meta.py index 909bd5b..a825c2d 100644 --- a/tests/test_template_tag_meta.py +++ b/tests/test_template_tag_meta.py @@ -53,7 +53,7 @@ class CreateMetaTemplateTagTest(TestCase): '