urls.py 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. ReadLocalJSONView
  16. )
  17. from .views import CacheManagementView, CacheStatsView
  18. urlpatterns = [
  19. # Existing endpoints
  20. path('extract/', ExtractProductAttributesView.as_view(), name='extract-attributes'),
  21. path('batch-extract/', BatchExtractProductAttributesView.as_view(), name='batch-extract-attributes'),
  22. path('products/', ProductListView.as_view(), name='product-list'),
  23. path('products/upload-excel/', ProductUploadExcelView.as_view(), name='product-upload-excel'),
  24. path('products/upload-attributes/', ProductAttributesUploadView.as_view(), name='product-upload-attributes'),
  25. path('products/attributes/', ProductTypeAttributesView.as_view(), name='product-type-attributes'),
  26. path('product-types/', ProductTypeListView.as_view(), name='product-types-list'),
  27. # New endpoints for original attribute values
  28. path('products/with-attributes/', ProductListWithAttributesView.as_view(), name='products-with-attributes'),
  29. path('attribute-values/', ProductAttributeValueView.as_view(), name='attribute-values'),
  30. path('attribute-values/bulk/', BulkProductAttributeValueView.as_view(), name='attribute-values-bulk'),
  31. # path('attribute-values/upload-excel/', ProductAttributeValueUploadExcelView.as_view(), name='attribute-values-upload'),
  32. path('attribute-values/', ProductAttributeValueView.as_view(), name='attribute-values'),
  33. path('attribute-values/bulk/', BulkProductAttributeValueView.as_view(), name='attribute-values-bulk'),
  34. path('cache/management/', CacheManagementView.as_view(), name='cache-management'),
  35. path('cache/stats/', CacheStatsView.as_view(), name='cache-stats'),
  36. path('batch-extract-json/', ReadLocalJSONView.as_view(), name='ReadLocalJSONView'),
  37. ]