B
B
bubaley2020-04-22 01:06:31
Django
bubaley, 2020-04-22 01:06:31

Why doesn't django rest swagger group urls?

Hello
There is a todoist project in which the todo application is connected.
Todo uses viewsets. In todo.urls, all this is registered in the router.

from rest_framework.routers import DefaultRouter
from . import views

router = DefaultRouter()
router.register(r'todos', views.TodoViewSet, basename='todo')
router.register(r'tags', views.TagViewSet, basename='tag')

urlpatterns = router.urls


In the root urls they are connected. Why do they still go to the api folder in ui-swagger? Can it be logically separated so that all tags methods are in tags and todos as well?
path('api/', include('todo.urls')),

5e9f6e5a32dc9983565979.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question