-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurls.py
32 lines (26 loc) · 1.04 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from django.contrib import admin
from django.urls import path, include
from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi
schema_view = get_schema_view(
openapi.Info(
title="Todos API",
default_version='v1',
description="Test description",
terms_of_service="https://www.google.com/policies/terms/",
license=openapi.License(name="BSD License"),
),
public=True,
permission_classes=[permissions.AllowAny],
)
urlpatterns = [
path("admin/", admin.site.urls),
path("api/v1/", include("todos.urls")),
path("api-auth/", include("rest_framework.urls")),
path('api/v1/dj-rest-auth/', include('dj_rest_auth.urls')),
path('api/v1/dj-rest-auth/registration/', include('dj_rest_auth.registration.urls')),
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'),
]