urls.py 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. BatchScoreViewV2,
  18. ContentRulesView,
  19. ExcelUploadView,
  20. )
  21. from .views import open_outlook_mail
  22. from .views import ProductTypeQualityMetricsView
  23. urlpatterns = [
  24. # Single product scoring
  25. path('api/score/', AttributeScoreView.as_view(), name='score_product'),
  26. path('api/batch-scor-v0/', BatchScoreView.as_view(), name='batch_score'),
  27. path('api/batch-score/', BatchScoreViewV2.as_view(), name='batch_score'),
  28. path('api/content-rules/', ContentRulesView.as_view(), name='content_rules'),
  29. path('api/upload-rules/', ExcelUploadView.as_view(), name='upload_rules'),
  30. path('api/quality-metrics/', ProductTypeQualityMetricsView.as_view(), name='quality-metrics'),
  31. path('run-script/', open_outlook_mail, name='open_outlook_mail'),
  32. ]