Replace django.conf.urls.url with django.urls.re_path

This commit is contained in:
blag 2021-12-20 02:01:25 -08:00
parent eb25a40c07
commit eb863621ff
No known key found for this signature in database
GPG key ID: 30870D32F59C5F40
2 changed files with 7 additions and 7 deletions

View file

@ -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')),
]

View file

@ -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'),
]