Skip to content

Commit

Permalink
mv re_path to path in jwt and auth token
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwojcik committed Nov 10, 2024
1 parent c88b7c1 commit 44ea180
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions djoser/urls/authtoken.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from django.urls import re_path
from django.urls import path

from djoser.views.token.create import TokenCreateView
from djoser.views.token.destroy import TokenDestroyView

urlpatterns = [
re_path(r"^token/login/?$", TokenCreateView.as_view(), name="login"),
re_path(r"^token/logout/?$", TokenDestroyView.as_view(), name="logout"),
path("token/login/", TokenCreateView.as_view(), name="login"),
path("token/logout/", TokenDestroyView.as_view(), name="logout"),
]
8 changes: 4 additions & 4 deletions djoser/urls/jwt.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from django.urls import re_path
from django.urls import path
from rest_framework_simplejwt import views

urlpatterns = [
re_path(r"^jwt/create/?", views.TokenObtainPairView.as_view(), name="jwt-create"),
re_path(r"^jwt/refresh/?", views.TokenRefreshView.as_view(), name="jwt-refresh"),
re_path(r"^jwt/verify/?", views.TokenVerifyView.as_view(), name="jwt-verify"),
path("jwt/create/", views.TokenObtainPairView.as_view(), name="jwt-create"),
path("jwt/refresh/", views.TokenRefreshView.as_view(), name="jwt-refresh"),
path("jwt/verify/", views.TokenVerifyView.as_view(), name="jwt-verify"),
]
10 changes: 5 additions & 5 deletions testproject/testapp/tests/test_urls/urls_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"pattern": "^auth/^jwt/create/?",
"pattern": "^auth/^jwt/create/\\Z",
"name": "jwt-create",
"allowed_methods": [
"get",
Expand All @@ -13,7 +13,7 @@
]
},
{
"pattern": "^auth/^jwt/refresh/?",
"pattern": "^auth/^jwt/refresh/\\Z",
"name": "jwt-refresh",
"allowed_methods": [
"get",
Expand All @@ -26,7 +26,7 @@
]
},
{
"pattern": "^auth/^jwt/verify/?",
"pattern": "^auth/^jwt/verify/\\Z",
"name": "jwt-verify",
"allowed_methods": [
"get",
Expand All @@ -52,7 +52,7 @@
]
},
{
"pattern": "^auth/^token/login/?$",
"pattern": "^auth/^token/login/\\Z",
"name": "login",
"allowed_methods": [
"get",
Expand All @@ -65,7 +65,7 @@
]
},
{
"pattern": "^auth/^token/logout/?$",
"pattern": "^auth/^token/logout/\\Z",
"name": "logout",
"allowed_methods": [
"get",
Expand Down

0 comments on commit 44ea180

Please sign in to comment.