safwanrahman / django-webpush

Web Push Notification Package for Django

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

url not defined

NicoCaldo opened this issue · comments

I'm having issue with

urlpatterns =  [
    url(r'^webpush/', include('webpush.urls'))
]

I've got an error name url is not defined

I can make it work using re_path like

urlpatterns =  [
    re_path(r'^webpush/', include('webpush.urls'))
]

Better documentation #132

Did you try importing urls
from django.conf.urls import url, include

Did you try importing urls from django.conf.urls import url, include

django.conf.urls.url() was deprecated in Django 3.0, and is removed in Django 4.0+.

https://stackoverflow.com/questions/70319606/importerror-cannot-import-name-url-from-django-conf-urls-after-upgrading-to