toolshed/backend/backend/urls.py

44 lines
1.5 KiB
Python
Raw Normal View History

2023-03-06 22:17:51 +00:00
"""backend URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
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.contrib import admin
2023-06-11 08:46:11 +00:00
from django.urls import path, include
from drf_yasg import openapi
from drf_yasg.views import get_schema_view
2023-10-24 22:18:14 +00:00
openapi_info = openapi.Info(
title="Toolshed API",
default_version='v1',
description="API for all things …",
)
2023-06-11 08:46:11 +00:00
schema_view = get_schema_view(
2023-10-24 22:18:14 +00:00
openapi_info,
2023-06-11 08:46:11 +00:00
public=True,
2023-10-24 22:18:14 +00:00
permission_classes=[],
2023-06-11 08:46:11 +00:00
)
2023-03-06 22:17:51 +00:00
urlpatterns = [
2023-06-11 08:46:11 +00:00
path('djangoadmin/', admin.site.urls),
2023-06-14 23:16:52 +00:00
path('auth/', include('authentication.api')),
2023-06-15 18:55:33 +00:00
path('admin/', include('hostadmin.api')),
2023-06-22 00:14:52 +00:00
path('api/', include('toolshed.api.friend')),
2023-06-22 02:51:18 +00:00
path('api/', include('toolshed.api.inventory')),
2023-06-22 02:08:52 +00:00
path('api/', include('toolshed.api.info')),
path('api/', include('toolshed.api.files')),
2023-10-23 21:51:30 +00:00
path('media/', include('files.media_urls')),
2023-06-11 08:46:11 +00:00
path('docs/', schema_view.with_ui('swagger', cache_timeout=0), name='api-docs'),
2023-03-06 22:17:51 +00:00
]