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.

35 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="examples/<int:example_id>/relations", view=RelationList.as_view(), name="relation_list"),
  14. path(
  15. route="examples/<int:example_id>/relations/<int:annotation_id>",
  16. view=RelationDetail.as_view(),
  17. name="relation_detail",
  18. ),
  19. path(route="examples/<int:example_id>/categories", view=CategoryListAPI.as_view(), name="category_list"),
  20. path(
  21. route="examples/<int:example_id>/categories/<int:annotation_id>",
  22. view=CategoryDetailAPI.as_view(),
  23. name="category_detail",
  24. ),
  25. path(route="examples/<int:example_id>/spans", view=SpanListAPI.as_view(), name="span_list"),
  26. path(route="examples/<int:example_id>/spans/<int:annotation_id>", view=SpanDetailAPI.as_view(), name="span_detail"),
  27. path(route="examples/<int:example_id>/texts", view=TextLabelListAPI.as_view(), name="text_list"),
  28. path(
  29. route="examples/<int:example_id>/texts/<int:annotation_id>",
  30. view=TextLabelDetailAPI.as_view(),
  31. name="text_detail",
  32. ),
  33. ]