Add Django backend, 1C integration, deploy config and API docs
Backend (Django 4.2 + DRF): - accounts: phone OTP login, JWT, profile, addresses - catalog: categories, products, images, filters, search, hits/new/related - orders: creation with Idempotency-Key, stock reservation, status history, cancel - loyalty: bonus accounts, promo codes, gift certificates - payments: payment records and YooKassa webhook handling - content: static pages, banners, site settings - integration: 1C exchange (catalog sync, order push via outbox, statuses, bonuses) - common: error envelope, pagination, request-id, integration auth, admin dashboard Infrastructure: Dockerfile, docker-compose (Postgres, Redis, Celery worker/beat, Nginx), requirements split by environment, OpenAPI contracts for site and 1C, architecture doc. Tests: 22 pytest cases covering catalog, orders, idempotency, OTP, integration.
This commit is contained in:
1 parent
5f8d37357d
commit
756f40353b
130 files changed
+10066
No files matched your search
@@ -0,0 +1,32 @@
|
||||
"""URL configuration for the HOMM backend."""
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.urls import include, path
|
||||
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView
|
||||
|
||||
admin.site.site_header = "HOMM — управление магазином"
|
||||
admin.site.site_title = "HOMM Admin"
|
||||
admin.site.index_title = "Панель управления"
|
||||
admin.site.index_template = "admin/homm_index.html"
|
||||
|
||||
urlpatterns = [
|
||||
path("admin/", admin.site.urls),
|
||||
path("api/v1/", include("apps.common.urls")),
|
||||
path("api/v1/auth/", include("apps.accounts.urls")),
|
||||
path("api/v1/catalog/", include("apps.catalog.urls")),
|
||||
path("api/v1/orders/", include("apps.orders.urls")),
|
||||
path("api/v1/loyalty/", include("apps.loyalty.urls")),
|
||||
path("api/v1/content/", include("apps.content.urls")),
|
||||
path("api/v1/payments/", include("apps.payments.urls")),
|
||||
path("api/v1/integration/1c/", include("apps.integration.urls")),
|
||||
path("api/schema/", SpectacularAPIView.as_view(), name="schema"),
|
||||
path(
|
||||
"api/docs/",
|
||||
SpectacularSwaggerView.as_view(url_name="schema"),
|
||||
name="swagger-ui",
|
||||
),
|
||||
]
|
||||
|
||||
if settings.DEBUG:
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
Reference in new issue
Block a user