This commit is contained in:
Tao Bojlen 2018-08-27 18:15:45 +02:00
parent 2c8f92130b
commit 4e0adc7579
1 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.urls import path, include, re_path
from django.urls import path, include
from django.views.generic import TemplateView
from rest_framework import routers
from apiv1 import views
@ -30,8 +30,8 @@ router = OptionalTrailingSlashRouter()
router.register(r'instances', views.InstanceViewSet)
urlpatterns = [
path(r'api/v1/', include(router.urls)),
re_path(r'.*', TemplateView.as_view(template_name='index.html')),
path(r'silk/', include('silk.urls', namespace='silk')),
path('api/v1/', include(router.urls)),
path('silk/', include('silk.urls', namespace='silk')),
path('', TemplateView.as_view(template_name='index.html')),
]