Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#from django.conf.urls import url #106

Closed
abadger1 opened this issue Dec 9, 2021 · 1 comment
Closed

#from django.conf.urls import url #106

abadger1 opened this issue Dec 9, 2021 · 1 comment

Comments

@abadger1
Copy link

abadger1 commented Dec 9, 2021

Think you need to remove/comment the top url import line in webpush/urls.py:-

#from django.conf.urls import url
from django.urls import path
from django.views.i18n import JavaScriptCatalog

from django.views.decorators.cache import cache_page
from django.utils import timezone
from . import views

# When we last restarted the server; used for cache control headers and
# invalidating the server side cache on server restart
last_modified_date = timezone.now().strftime("%Y-%m-%d_%H:%M:%S")

urlpatterns = [
    path('jsi18n/',
         cache_page(86400, key_prefix='js18n-%s' % last_modified_date)(
             JavaScriptCatalog.as_view(packages=['webpush'])
         ),
         name='javascript-catalog'),
    path('save_information', views.save_info, name='save_webpush_info'),
    # Service worker need to be loaded from same domain
    path('service-worker.js', views.ServiceWorkerView.as_view(), name='service_worker')
]
@javadnikbakht
Copy link

javadnikbakht commented Sep 28, 2022

@safwanrahman , you can close this issue manually, it resolved in #107 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants