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

Django 4.0 compitability #347

Closed
miklagard opened this issue Oct 6, 2022 · 1 comment
Closed

Django 4.0 compitability #347

miklagard opened this issue Oct 6, 2022 · 1 comment
Labels

Comments

@miklagard
Copy link

in views.py there is:

from django.utils.http import is_safe_url

ImportError: cannot import name 'is_safe_url' from 'django.utils.http'

is_safe_url is outdates in django 4.0. it should be something like:
from django.utils.http import url_has_allowed_host_and_scheme as is_safe_url

once again, there is:
from django.conf.urls import url

in newer django versions, there is no url but from django.urls import path.

@g-as
Copy link
Contributor

g-as commented Oct 7, 2022

It seems you're not using the latest version, which is compat with Django 4.0.x:

See #317

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

No branches or pull requests

3 participants