Add choices API endpoint and OpenAPI client setup

Introduces a new /api/choices/ endpoint for fetching model choices with multilingual labels. Updates Django models to use 'cz#' prefix for Czech labels. Adds OpenAPI client generation via orval, refactors frontend API structure, and provides documentation and helper scripts for dynamic choices and OpenAPI usage.
This commit is contained in:
David Bruno Vontor
2025-12-04 17:35:47 +01:00
parent ebab304b75
commit d94ad93222
24 changed files with 281 additions and 76 deletions

View File

@@ -16,6 +16,7 @@ Including another URLconf
"""
from django.contrib import admin
from django.urls import path, include
from .views import choices
from drf_spectacular.views import (
SpectacularAPIView,
@@ -31,6 +32,7 @@ urlpatterns = [
path('admin/', admin.site.urls),
path("api/choices/", choices, name="choices"),
path('api/account/', include('account.urls')),
path('api/commerce/', include('commerce.urls')),
#path('api/advertisments/', include('advertisements.urls')),