Тимур
2024-04-02 13:01:57 +03:00
3 changed files with 22 additions and 22 deletions
+21 -1
View File
@@ -1,6 +1,26 @@
from django.contrib import admin
from django.urls import include, path
from drf_yasg import openapi
from drf_yasg.views import get_schema_view
schema_view = get_schema_view(
openapi.Info(title="SkillHub API", default_version="1")
)
urlpatterns = [
# Built-in views
path("admin/", admin.site.urls),
# API documentation
path(
"swagger/",
schema_view.with_ui("swagger"),
name="swagger",
),
path(
"redoc/",
schema_view.with_ui("redoc"),
name="redoc",
),
path(
"users/",
include("api.users.urls", namespace="users"),
@@ -12,5 +32,5 @@ urlpatterns = [
path(
"trees/",
include("api.tree.urls", namespace="trees"),
)
),
]
-21
View File
@@ -1,28 +1,7 @@
from django.conf import settings
from django.contrib import admin
from django.urls import include, path
from drf_yasg import openapi
from drf_yasg.views import get_schema_view
schema_view = get_schema_view(
openapi.Info(title="SkillHub API", default_version="1")
)
urlpatterns = [
# Built-in urls
path("admin/", admin.site.urls),
# API documentation
path(
"swagger/",
schema_view.with_ui("swagger"),
name="swagger",
),
path(
"redoc/",
schema_view.with_ui("redoc"),
name="redoc",
),
# API
path("api/", include("api.urls")),
]