urls.py 2.6 KB

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