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.

50 lines
1.4 KiB

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