feat: add catalogue image management (#1)
- Add CatalogueImage model with FK to Product - Add image resize service (strict/non-strict modes with configurable dimensions) - Add CRUD API endpoints with admin-only write permissions - Add catalogue_images field to product listing/detail endpoints - Serve media files in development via static() - 28 TDD tests covering model, API, permissions, resize, and product listing
This commit is contained in:
@@ -3,6 +3,8 @@ from rest_framework.routers import DefaultRouter
|
||||
|
||||
from . import views
|
||||
from .api import (
|
||||
# Catalogue Images
|
||||
CatalogueImageViewSet,
|
||||
# Products
|
||||
ProductView,
|
||||
ProductsFromTrytonView,
|
||||
@@ -33,6 +35,11 @@ router.register(r"sales", SaleView, basename="sale")
|
||||
router.register(r"catalog_sales", CatalogSaleView, basename="catalog_sale")
|
||||
router.register(r"customers", CustomerView, basename="customer")
|
||||
router.register(r"products", ProductView, basename="product")
|
||||
router.register(
|
||||
r"catalogue_images",
|
||||
CatalogueImageViewSet,
|
||||
basename="catalogue_image",
|
||||
)
|
||||
router.register(
|
||||
r"reconciliate_jar",
|
||||
ReconciliateJarModelView,
|
||||
|
||||
Reference in New Issue
Block a user