mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-12-02 13:53:43 +03:00
switch to using path() and re_path() instead of deprecated url()
This commit is contained in:
parent
140112927f
commit
a67cdb5a52
|
@ -1,11 +1,11 @@
|
||||||
from django.conf.urls import url
|
from django.urls import path, re_path
|
||||||
from django.views.generic import TemplateView
|
from django.views.generic import TemplateView
|
||||||
|
|
||||||
from .views import RegisterView, VerifyEmailView
|
from .views import RegisterView, VerifyEmailView
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^$', RegisterView.as_view(), name='rest_register'),
|
path('', RegisterView.as_view(), name='rest_register'),
|
||||||
url(r'^verify-email/$', VerifyEmailView.as_view(), name='rest_verify_email'),
|
path('verify-email/', VerifyEmailView.as_view(), name='rest_verify_email'),
|
||||||
|
|
||||||
# This url is used by django-allauth and empty TemplateView is
|
# This url is used by django-allauth and empty TemplateView is
|
||||||
# defined just to allow reverse() call inside app, for example when email
|
# defined just to allow reverse() call inside app, for example when email
|
||||||
|
@ -18,6 +18,6 @@ urlpatterns = [
|
||||||
# If you don't want to use API on that step, then just use ConfirmEmailView
|
# If you don't want to use API on that step, then just use ConfirmEmailView
|
||||||
# view from:
|
# view from:
|
||||||
# django-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py
|
# django-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py
|
||||||
url(r'^account-confirm-email/(?P<key>[-:\w]+)/$', TemplateView.as_view(),
|
re_path(r'^account-confirm-email/(?P<key>[-:\w]+)/$', TemplateView.as_view(),
|
||||||
name='account_confirm_email'),
|
name='account_confirm_email'),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user