urls.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # # urls.py
  2. # from django.urls import path
  3. # from .views import AttributeScoreView, BatchScoreView
  4. # urlpatterns = [
  5. # path("attribute_score/", AttributeScoreView.as_view(), name="attribute_score"),
  6. # path("attribute_score/<str:sku>/", AttributeScoreView.as_view(), name="get_attribute_score"),
  7. # path("batch_score/", BatchScoreView.as_view(), name="batch_score"),
  8. # ]
  9. # urls.py
  10. """
  11. URL configuration for the Product Quality Scoring API
  12. """
  13. from django.urls import path
  14. from core.views import (
  15. AttributeScoreView,
  16. BatchScoreView,
  17. ContentRulesView,
  18. ProductScoreDetailView
  19. )
  20. urlpatterns = [
  21. # Single product scoring
  22. path('api/score/', AttributeScoreView.as_view(), name='score_product'),
  23. # Batch scoring
  24. path('api/batch-score/', BatchScoreView.as_view(), name='batch_score'),
  25. # Content rules management
  26. path('api/content-rules/', ContentRulesView.as_view(), name='content_rules'),
  27. # Get product score details
  28. path('api/product/<str:sku>/score/', ProductScoreDetailView.as_view(), name='product_score_detail'),
  29. ]