Add initial implementations for forms and organization apps with serializers, factories, and admin configurations
Some checks failed
CI/CD Pipeline / Run Tests (push) Failing after 45s
CI/CD Pipeline / Code Quality Checks (push) Failing after 48s
CI/CD Pipeline / Build Docker Images (push) Has been skipped
CI/CD Pipeline / Push to Gitea Registry (push) Has been skipped
CI/CD Pipeline / Deploy to Server (push) Has been skipped
Some checks failed
CI/CD Pipeline / Run Tests (push) Failing after 45s
CI/CD Pipeline / Code Quality Checks (push) Failing after 48s
CI/CD Pipeline / Build Docker Images (push) Has been skipped
CI/CD Pipeline / Push to Gitea Registry (push) Has been skipped
CI/CD Pipeline / Deploy to Server (push) Has been skipped
This commit is contained in:
49
src/core/urls.py
Normal file
49
src/core/urls.py
Normal file
@@ -0,0 +1,49 @@
|
||||
"""
|
||||
URL Configuration for the project.
|
||||
|
||||
The `urlpatterns` list routes URLs to views.
|
||||
"""
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.urls import include, path
|
||||
from apps.core.openapi import (
|
||||
OPENAPI_PROJECT_DESCRIPTION,
|
||||
OPENAPI_PROJECT_TITLE,
|
||||
RussianTagSchemaGenerator,
|
||||
)
|
||||
from drf_yasg import openapi
|
||||
from drf_yasg.views import get_schema_view
|
||||
from rest_framework import permissions
|
||||
|
||||
# Swagger schema view
|
||||
schema_view = get_schema_view(
|
||||
openapi.Info(
|
||||
title=OPENAPI_PROJECT_TITLE,
|
||||
default_version="v1",
|
||||
description=OPENAPI_PROJECT_DESCRIPTION,
|
||||
contact=openapi.Contact(email="contact@state-corp.local"),
|
||||
license=openapi.License(name="BSD License"),
|
||||
),
|
||||
public=True,
|
||||
generator_class=RussianTagSchemaGenerator,
|
||||
permission_classes=(permissions.AllowAny,),
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
path(
|
||||
"",
|
||||
schema_view.with_ui("swagger", cache_timeout=0),
|
||||
name="schema-swagger-ui",
|
||||
),
|
||||
path("admin/", admin.site.urls),
|
||||
path("health/", include("apps.core.urls")),
|
||||
path("api/v1/", include("core.api_v1_urls", namespace="api_v1")),
|
||||
path("auth/", include("rest_framework.urls")),
|
||||
]
|
||||
|
||||
# Serve media files in development
|
||||
if settings.DEBUG:
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
Reference in New Issue
Block a user