diff --git a/swagger_example/urls.py b/swagger_example/urls.py index ce65e48..8bd7e9a 100644 --- a/swagger_example/urls.py +++ b/swagger_example/urls.py @@ -13,9 +13,8 @@ 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ -from django.conf.urls import url from django.contrib import admin -from django.urls import path, include +from django.urls import path, include, re_path from drf_yasg.views import get_schema_view from drf_yasg import openapi @@ -32,7 +31,7 @@ ) urlpatterns = [ - url('^showroom/', include('showroom_manager.urls')), + re_path('^showroom/', include('showroom_manager.urls')), path('admin/', admin.site.urls), - url(r'^swagger/$', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'), + re_path(r'^swagger/$', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'), ]