2025-05-18 19:19:16 +03:00
|
|
|
"""
|
|
|
|
|
URL configuration for tisbiProFi project.
|
|
|
|
|
|
|
|
|
|
The `urlpatterns` list routes URLs to views. For more information please see:
|
|
|
|
|
https://docs.djangoproject.com/en/4.2/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'))
|
|
|
|
|
"""
|
2025-05-19 12:54:50 +03:00
|
|
|
from django.conf import settings
|
|
|
|
|
from django.conf.urls.static import static
|
2025-05-18 19:19:16 +03:00
|
|
|
from django.contrib import admin
|
2025-05-19 12:54:50 +03:00
|
|
|
from django.urls import path, include
|
|
|
|
|
from drf_yasg import openapi
|
|
|
|
|
from drf_yasg.views import get_schema_view
|
|
|
|
|
from rest_framework import permissions
|
|
|
|
|
|
|
|
|
|
schema_view = get_schema_view(
|
|
|
|
|
openapi.Info(
|
|
|
|
|
title="ProFi API",
|
|
|
|
|
default_version='v1',
|
|
|
|
|
description="API for ProFi (v1)",
|
|
|
|
|
contact=openapi.Contact(email="support@novelplus.ru"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
public=True,
|
|
|
|
|
permission_classes=[permissions.AllowAny],
|
|
|
|
|
)
|
|
|
|
|
|
2025-05-18 19:19:16 +03:00
|
|
|
|
|
|
|
|
urlpatterns = [
|
|
|
|
|
path('admin/', admin.site.urls),
|
2025-05-19 12:54:50 +03:00
|
|
|
path('api/v1/education/', include("education.urls")),
|
2025-05-19 17:00:02 +03:00
|
|
|
path('api/v1/employees/', include("employees.urls")),
|
2025-05-19 17:10:30 +03:00
|
|
|
path('api/v1/events/', include("events.urls")),
|
|
|
|
|
path('api/v1/outreach/', include("outreach.urls")),
|
|
|
|
|
path('api/v1/surveys/', include("surveys.urls")),
|
2025-05-19 17:22:00 +03:00
|
|
|
path('api/v1/users/', include("users.urls")),
|
2025-05-19 12:54:50 +03:00
|
|
|
|
|
|
|
|
path('docs/swagger<format>/', schema_view.without_ui(cache_timeout=0), name='schema-json'),
|
|
|
|
|
path('docs/swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
|
|
|
|
|
path('docs/redoc/', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
|
|
|
|
|
|
|
|
|
|
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
|
|
|
|
|
|
|
|
|
if settings.DEBUG:
|
|
|
|
|
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|