You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.9 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. from django.urls import path
  2. from .views import (
  3. BoundingBoxDetailAPI,
  4. BoundingBoxListAPI,
  5. CategoryDetailAPI,
  6. CategoryListAPI,
  7. RelationDetail,
  8. RelationList,
  9. SegmentationDetailAPI,
  10. SegmentationListAPI,
  11. SpanDetailAPI,
  12. SpanListAPI,
  13. TextLabelDetailAPI,
  14. TextLabelListAPI,
  15. )
  16. urlpatterns = [
  17. path(route="examples/<int:example_id>/relations", view=RelationList.as_view(), name="relation_list"),
  18. path(
  19. route="examples/<int:example_id>/relations/<int:annotation_id>",
  20. view=RelationDetail.as_view(),
  21. name="relation_detail",
  22. ),
  23. path(route="examples/<int:example_id>/categories", view=CategoryListAPI.as_view(), name="category_list"),
  24. path(
  25. route="examples/<int:example_id>/categories/<int:annotation_id>",
  26. view=CategoryDetailAPI.as_view(),
  27. name="category_detail",
  28. ),
  29. path(route="examples/<int:example_id>/spans", view=SpanListAPI.as_view(), name="span_list"),
  30. path(route="examples/<int:example_id>/spans/<int:annotation_id>", view=SpanDetailAPI.as_view(), name="span_detail"),
  31. path(route="examples/<int:example_id>/texts", view=TextLabelListAPI.as_view(), name="text_list"),
  32. path(
  33. route="examples/<int:example_id>/texts/<int:annotation_id>",
  34. view=TextLabelDetailAPI.as_view(),
  35. name="text_detail",
  36. ),
  37. path(route="examples/<int:example_id>/bboxes", view=BoundingBoxListAPI.as_view(), name="bbox_list"),
  38. path(
  39. route="examples/<int:example_id>/bboxes/<int:annotation_id>",
  40. view=BoundingBoxDetailAPI.as_view(),
  41. name="bbox_detail",
  42. ),
  43. path(route="examples/<int:example_id>/segments", view=SegmentationListAPI.as_view(), name="segmentation_list"),
  44. path(
  45. route="examples/<int:example_id>/segments/<int:annotation_id>",
  46. view=SegmentationDetailAPI.as_view(),
  47. name="segmentation_detail",
  48. ),
  49. ]