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

url not defined #131

Open
NicoCaldo opened this issue Sep 27, 2023 · 3 comments
Open

url not defined #131

NicoCaldo opened this issue Sep 27, 2023 · 3 comments

Comments

@NicoCaldo
Copy link

NicoCaldo commented Sep 27, 2023

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'))
]
@NicoCaldo
Copy link
Author

Better documentation #132

@Sasikumar00
Copy link

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

@NicoCaldo
Copy link
Author

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

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

2 participants