From 566dafa87a88476a838886351bf8b68e74b7bd20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Mon, 4 Sep 2023 21:33:34 +0200 Subject: [PATCH] Update to latest LTS django version --- shimatta_kenkyusho/api/urls.py | 7 +++---- shimatta_kenkyusho/shimatta_kenkyusho/urls.py | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/shimatta_kenkyusho/api/urls.py b/shimatta_kenkyusho/api/urls.py index 18b7644..5d2e2b9 100644 --- a/shimatta_kenkyusho/api/urls.py +++ b/shimatta_kenkyusho/api/urls.py @@ -1,7 +1,6 @@ -from django.urls import include, path +from django.urls import include, path, re_path from rest_framework import routers from .views import * -from django.conf.urls import url router = routers.DefaultRouter() router.register(r'users', UserViewSet) @@ -17,6 +16,6 @@ router.register(r'parts/component-param-types', PartsComponentParameterTypeViewS urlpatterns = [ path('', include(router.urls)), - url(r'^token-auth/', ObtainExpiringAuthToken.as_view()), - url(r'^token-logout/', TokenLogout.as_view()), + re_path(r'^token-auth/', ObtainExpiringAuthToken.as_view()), + re_path(r'^token-logout/', TokenLogout.as_view()), ] \ No newline at end of file diff --git a/shimatta_kenkyusho/shimatta_kenkyusho/urls.py b/shimatta_kenkyusho/shimatta_kenkyusho/urls.py index e8ac531..c01b976 100644 --- a/shimatta_kenkyusho/shimatta_kenkyusho/urls.py +++ b/shimatta_kenkyusho/shimatta_kenkyusho/urls.py @@ -14,14 +14,13 @@ Including another URLconf 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin -from django.urls import path, include -from django.conf.urls import url +from django.urls import path, include, re_path from django.conf.urls.static import static from django.conf import settings from parts import views as parts_views urlpatterns = [ - url(r'^admin/login/', parts_views.login_view), + re_path(r'^admin/login/', parts_views.login_view), path('admin/', admin.site.urls), path('api/v1/', include('api.urls'), name='api-root'), path('', include('parts.urls')),