fix URLs
This commit is contained in:
parent
2c8f92130b
commit
4e0adc7579
|
@ -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')),
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in a new issue