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.

31 lines
1.2 KiB

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. CategoryDetailAPI,
  4. CategoryListAPI,
  5. RelationDetail,
  6. RelationList,
  7. SpanDetailAPI,
  8. SpanListAPI,
  9. TextLabelDetailAPI,
  10. TextLabelListAPI,
  11. )
  12. urlpatterns = [
  13. path(route="annotation_relations", view=RelationList.as_view(), name="relation_list"),
  14. path(route="annotation_relations/<int:annotation_id>", view=RelationDetail.as_view(), name="relation_detail"),
  15. path(route="examples/<int:example_id>/categories", view=CategoryListAPI.as_view(), name="category_list"),
  16. path(
  17. route="examples/<int:example_id>/categories/<int:annotation_id>",
  18. view=CategoryDetailAPI.as_view(),
  19. name="category_detail",
  20. ),
  21. path(route="examples/<int:example_id>/spans", view=SpanListAPI.as_view(), name="span_list"),
  22. path(route="examples/<int:example_id>/spans/<int:annotation_id>", view=SpanDetailAPI.as_view(), name="span_detail"),
  23. path(route="examples/<int:example_id>/texts", view=TextLabelListAPI.as_view(), name="text_list"),
  24. path(
  25. route="examples/<int:example_id>/texts/<int:annotation_id>",
  26. view=TextLabelDetailAPI.as_view(),
  27. name="text_detail",
  28. ),
  29. ]