So I\'m building a Django progressive web app with offline support using service workers.
According to google\'s documentation, the sw.js file should be at the root
Django 2.2
project structure
myproj/
|-app/
| |-templates/
| |-app/
| -sw.js
|-myproj/
-urls.py
urls.py (project)
from django.views.generic import TemplateView
urlpatterns = [
...
path('sw.js', (TemplateView.as_view(template_name="app/sw.js",
content_type='application/javascript', )), name='sw.js'),
]