Django Offline

20 views
Skip to first unread message

Abid Mohamed Nadhir

unread,
Apr 18, 2021, 1:28:10 PM4/18/21
to Django users
Hello, I'm trying to implement a django project with service worker, i'm wondering where to put my service worker?
Thanks

Ryan Nowakowski

unread,
Apr 18, 2021, 3:22:22 PM4/18/21
to django...@googlegroups.com
Typically JavaScript is treated as a static file:

https://docs.djangoproject.com/en/3.2/howto/static-files/

Abid Mohamed Nadhir

unread,
Apr 19, 2021, 5:42:23 AM4/19/21
to Django users
I've found the solution i created the service worker manually and created a URL for it. then I've called it in the main.html template
Thanks For replying

Reply all
Reply to author
Forward
0 new messages