forked from Therapoid/django-password-policies
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use path instead of re_path in most cases
- Loading branch information
1 parent
b05899c
commit b2a0ff6
Showing
4 changed files
with
16 additions
and
29 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
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
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,21 +1,9 @@ | ||
try: | ||
from django.conf.urls import include, url | ||
except ImportError: | ||
from django.urls import include | ||
from django.urls import re_path as url | ||
|
||
try: | ||
from django.conf.urls import patterns | ||
except ImportError: | ||
patterns = False | ||
from django.urls import include, path | ||
|
||
from password_policies.tests.views import TestHomeView, TestLoggedOutMixinView | ||
|
||
urlpatterns = [ | ||
url(r"^password/", include("password_policies.urls")), | ||
url(r"^$", TestHomeView.as_view(), name="home"), | ||
url(r"^fubar/", TestLoggedOutMixinView.as_view(), name="loggedoutmixin"), | ||
path("password/", include("password_policies.urls")), | ||
path("", TestHomeView.as_view(), name="home"), | ||
path("fubar/", TestLoggedOutMixinView.as_view(), name="loggedoutmixin"), | ||
] | ||
|
||
if patterns: | ||
urlpatterns = patterns("", *urlpatterns) # noqa |
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