Skip to content
Snippets Groups Projects
Commit 5db94aae authored by Jan David Mol's avatar Jan David Mol
Browse files

Task LSMR-102: url is now re_path in Django

parent 8f76c1a2
No related branches found
No related tags found
1 merge request!87Lsmr epic
......@@ -15,7 +15,7 @@ Including another URLconf
"""
from django.contrib import admin
from django.urls import path, url
from django.urls import path, re_path
from django.views.generic.base import TemplateView
from rest_framework import routers, permissions
......@@ -45,7 +45,7 @@ schema_view = get_schema_view(
urlpatterns = [
path('admin/', admin.site.urls),
path('docs/', include_docs_urls(title='LSMR API')),
url(r'^swagger(?P<format>\.json|\.yaml)$', schema_view.without_ui(cache_timeout=0), name='schema-json'),
re_path(r'^swagger(?P<format>\.json|\.yaml)$', schema_view.without_ui(cache_timeout=0), name='schema-json'),
path('swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
path('redoc/', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment