From eb863621ffeca9ec7fe79c74cc60172cbac20ae1 Mon Sep 17 00:00:00 2001 From: blag Date: Mon, 20 Dec 2021 02:01:25 -0800 Subject: [PATCH] Replace django.conf.urls.url with django.urls.re_path --- tos/tests/test_urls.py | 8 ++++---- tos/urls.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tos/tests/test_urls.py b/tos/tests/test_urls.py index cf71077..f258956 100644 --- a/tos/tests/test_urls.py +++ b/tos/tests/test_urls.py @@ -1,12 +1,12 @@ -from django.conf.urls import include, url +from django.urls import include, re_path from django.views.generic import TemplateView from tos import views urlpatterns = [ - url(r'^$', TemplateView.as_view(template_name='index.html'), name='index'), + re_path(r'^$', TemplateView.as_view(template_name='index.html'), name='index'), - url(r'^login/$', views.login, {}, 'login'), - url(r'^tos/', include('tos.urls')), + re_path(r'^login/$', views.login, {}, 'login'), + re_path(r'^tos/', include('tos.urls')), ] diff --git a/tos/urls.py b/tos/urls.py index 5516098..89f26b7 100644 --- a/tos/urls.py +++ b/tos/urls.py @@ -1,12 +1,12 @@ -from django.conf.urls import url +from django.urls import re_path from tos.views import check_tos, TosView urlpatterns = [ # Terms of Service conform - url(r'^confirm/$', check_tos, name='tos_check_tos'), + re_path(r'^confirm/$', check_tos, name='tos_check_tos'), # Terms of service simple display - url(r'^$', TosView.as_view(), name='tos'), + re_path(r'^$', TosView.as_view(), name='tos'), ]