-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The import shim was required for Django versions pre 3.0, but this library requires at least Django 3.2.
- Loading branch information
1 parent
5c21c4b
commit 2c90289
Showing
2 changed files
with
3 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
try: | ||
from django.utils.http import url_has_allowed_host_and_scheme | ||
except ImportError: # django < 3.0 | ||
from django.utils.http import is_safe_url as url_has_allowed_host_and_scheme | ||
|
||
try: # django >= 4.1 | ||
from django.contrib.auth.views import RedirectURLMixin | ||
except ImportError: | ||
from django.contrib.auth.views import ( | ||
SuccessURLAllowedHostsMixin as RedirectURLMixin, | ||
) | ||
|
||
__all__ = ["url_has_allowed_host_and_scheme", "RedirectURLMixin"] | ||
__all__ = ["RedirectURLMixin"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters