UPDATE DJANGO 4 url -> re_path

This commit is contained in:
OMAR AIT BENHADDI 2022-08-13 06:21:27 +02:00 committed by GitHub
parent cdd04aa9be
commit d5fceddbe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
from django.conf.urls import url from django.urls import re_path
from rest_auth.views import ( from rest_auth.views import (
LoginView, LogoutView, UserDetailsView, PasswordChangeView, LoginView, LogoutView, UserDetailsView, PasswordChangeView,
@ -7,14 +7,14 @@ from rest_auth.views import (
urlpatterns = [ urlpatterns = [
# URLs that do not require a session or valid token # URLs that do not require a session or valid token
url(r'^password/reset/$', PasswordResetView.as_view(), re_path(r'^password/reset/$', PasswordResetView.as_view(),
name='rest_password_reset'), name='rest_password_reset'),
url(r'^password/reset/confirm/$', PasswordResetConfirmView.as_view(), re_path(r'^password/reset/confirm/$', PasswordResetConfirmView.as_view(),
name='rest_password_reset_confirm'), name='rest_password_reset_confirm'),
url(r'^login/$', LoginView.as_view(), name='rest_login'), re_path(r'^login/$', LoginView.as_view(), name='rest_login'),
# URLs that require a user to be logged in with a valid session / token. # URLs that require a user to be logged in with a valid session / token.
url(r'^logout/$', LogoutView.as_view(), name='rest_logout'), re_path(r'^logout/$', LogoutView.as_view(), name='rest_logout'),
url(r'^user/$', UserDetailsView.as_view(), name='rest_user_details'), re_path(r'^user/$', UserDetailsView.as_view(), name='rest_user_details'),
url(r'^password/change/$', PasswordChangeView.as_view(), re_path(r'^password/change/$', PasswordChangeView.as_view(),
name='rest_password_change'), name='rest_password_change'),
] ]