mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-03 16:41:27 +01:00
17 lines
852 B
Python
17 lines
852 B
Python
from django.contrib import admin
|
|
from django.urls import path, include
|
|
from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, SpectacularSwaggerView
|
|
from rest_framework.authtoken.views import obtain_auth_token
|
|
from django.conf import settings
|
|
from django.conf.urls.static import static
|
|
|
|
urlpatterns = [
|
|
path('admin/', admin.site.urls),
|
|
path('api/', include('api.urls')),
|
|
path('api/token/', obtain_auth_token, name='api_token'),
|
|
path('api-auth/', include('rest_framework.urls')),
|
|
path('api/schema/', SpectacularAPIView.as_view(), name='schema'),
|
|
path('api/schema/swagger-ui/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'),
|
|
path('api/schema/redoc/', SpectacularRedocView.as_view(url_name='schema'), name='redoc'),
|
|
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|