schon/evibes/b2b_urls.py
Egor fureunoir Gorbunov 7ff62cea0e Features: 1) Add detailed class-level docstrings for multiple ViewSets and views, improving maintainability and documentation; 2) Introduce namespace for "core_b2b" in URL patterns for better URL resolution.
Fixes: 1) Remove unused "prometheus/" URL pattern for cleanup.

Extra: Update imports and formats for consistency; refine sitemap functions with explicit docstrings.
2025-06-29 19:56:52 +03:00

23 lines
962 B
Python

from django.conf import settings
from django.conf.urls.static import static
from django.urls import include, path
from drf_spectacular.views import SpectacularAPIView
from core.views import CustomRedocView, CustomSwaggerView, favicon_view
from evibes.settings import SPECTACULAR_B2B_SETTINGS
urlpatterns = [
path(
r"docs/",
SpectacularAPIView.as_view(urlconf="evibes.b2b_urls", custom_settings=SPECTACULAR_B2B_SETTINGS),
name="schema-b2b",
),
path(r"docs/swagger/", CustomSwaggerView.as_view(url_name="schema-b2b"), name="swagger-ui-b2b"),
path(r"docs/redoc/", CustomRedocView.as_view(url_name="schema-b2b"), name="redoc-ui-b2b"),
path(r"favicon.ico", favicon_view),
path(r"", include("core.b2b_urls", namespace="core_b2b")),
]
if settings.DEBUG:
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)