schon/evibes/api_urls.py
Egor fureunoir Gorbunov 6fa037390c Features: 1) Add get_gateways_integrations utility for payment gateway integrations; 2) Add get_vendors_integrations utility for vendor integrations; 3) Add version API endpoint to return eVibes version; 4) Implement __str__ method for AbstractVendor;
Fixes: 1) Update return type of `create_object` to `Any`;

Extra: 1) Remove unused fields (`icon`, `priority`, `hide`) from `blog.apps`; 2) Update API URLs to include `version` endpoint; 3) Miscellaneous cleanup and comments.
2025-10-15 14:25:10 +03:00

53 lines
2 KiB
Python

from django.conf import settings
from django.conf.urls.i18n import i18n_patterns
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
from django.views.decorators.csrf import csrf_exempt
from drf_spectacular.views import SpectacularAPIView
from core.graphene.schema import schema
from core.views import (
CustomGraphQLView,
CustomRedocView,
CustomSwaggerView,
favicon_view,
index,
version,
)
from evibes.settings import SPECTACULAR_PLATFORM_SETTINGS
urlpatterns = [
path(r"health/", include("health_check.urls", namespace="health_check")),
path("prometheus/", include("django_prometheus.urls")),
path(r"graphql/", csrf_exempt(CustomGraphQLView.as_view(graphiql=True, schema=schema)), name="graphql-platform"),
path(
r"docs/",
SpectacularAPIView.as_view(urlconf="evibes.api_urls", custom_settings=SPECTACULAR_PLATFORM_SETTINGS),
name="schema-platform",
),
path(
r"docs/swagger/",
CustomSwaggerView.as_view(url_name="schema-platform"),
name="swagger-ui-platform",
),
path(
r"docs/redoc/",
CustomRedocView.as_view(url_name="schema-platform"),
name="redoc-ui-platform",
),
path("summernote/", include("django_summernote.urls")),
path(r"i18n/", include("django.conf.urls.i18n")),
path(r"favicon.ico", favicon_view),
path(r"", index),
path(r"", version),
path(r"", include("core.api_urls", namespace="core")),
path(r"auth/", include("vibes_auth.urls", namespace="vibes_auth")),
path(r"payments/", include("payments.urls", namespace="payments")),
path(r"blog/", include("blog.urls", namespace="blog")),
path("admin/doc/", include("django.contrib.admindocs.urls")),
] + i18n_patterns(path("admin/", admin.site.urls))
if settings.DEBUG:
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)