urls.py 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # urls.py
  2. from django.urls import path
  3. from .views import (
  4. ExtractProductAttributesView,
  5. ProductTypeListView,
  6. ProductTypeAttributesView,
  7. ProductAttributesUploadView,
  8. BatchExtractProductAttributesView,
  9. ProductListView,
  10. ProductUploadExcelView,
  11. ProductAttributeValueView,
  12. BulkProductAttributeValueView,
  13. # ProductAttributeValueUploadExcelView,
  14. ProductListWithAttributesView
  15. )
  16. urlpatterns = [
  17. # Existing endpoints
  18. path('extract/', ExtractProductAttributesView.as_view(), name='extract-attributes'),
  19. path('batch-extract/', BatchExtractProductAttributesView.as_view(), name='batch-extract-attributes'),
  20. path('products/', ProductListView.as_view(), name='product-list'),
  21. path('products/upload-excel/', ProductUploadExcelView.as_view(), name='product-upload-excel'),
  22. path('products/upload-attributes/', ProductAttributesUploadView.as_view(), name='product-upload-attributes'),
  23. path('products/attributes/', ProductTypeAttributesView.as_view(), name='product-type-attributes'),
  24. path('product-types/', ProductTypeListView.as_view(), name='product-types-list'),
  25. # New endpoints for original attribute values
  26. path('products/with-attributes/', ProductListWithAttributesView.as_view(), name='products-with-attributes'),
  27. path('attribute-values/', ProductAttributeValueView.as_view(), name='attribute-values'),
  28. path('attribute-values/bulk/', BulkProductAttributeValueView.as_view(), name='attribute-values-bulk'),
  29. # path('attribute-values/upload-excel/', ProductAttributeValueUploadExcelView.as_view(), name='attribute-values-upload'),
  30. path('attribute-values/', ProductAttributeValueView.as_view(), name='attribute-values'),
  31. path('attribute-values/bulk/', BulkProductAttributeValueView.as_view(), name='attribute-values-bulk'),
  32. ]