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.

111 lines
2.8 KiB

4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. from django.urls import include, path
  2. from .views import (comment, example, example_state, health, label, project,
  3. tag, task)
  4. urlpatterns_project = [
  5. path(
  6. route='category-types',
  7. view=label.CategoryTypeList.as_view(),
  8. name='category_types'
  9. ),
  10. path(
  11. route='category-types/<int:label_id>',
  12. view=label.CategoryTypeDetail.as_view(),
  13. name='category_type'
  14. ),
  15. path(
  16. route='span-types',
  17. view=label.SpanTypeList.as_view(),
  18. name='span_types'
  19. ),
  20. path(
  21. route='span-types/<int:label_id>',
  22. view=label.SpanTypeDetail.as_view(),
  23. name='span_type'
  24. ),
  25. path(
  26. route='category-type-upload',
  27. view=label.CategoryTypeUploadAPI.as_view(),
  28. name='category_type_upload'
  29. ),
  30. path(
  31. route='span-type-upload',
  32. view=label.SpanTypeUploadAPI.as_view(),
  33. name='span_type_upload'
  34. ),
  35. path(
  36. route='examples',
  37. view=example.ExampleList.as_view(),
  38. name='example_list'
  39. ),
  40. path(
  41. route='examples/<int:example_id>',
  42. view=example.ExampleDetail.as_view(),
  43. name='example_detail'
  44. ),
  45. path(
  46. route='relation_types',
  47. view=label.RelationTypeList.as_view(),
  48. name='relation_types_list'
  49. ),
  50. path(
  51. route='relation_type-upload',
  52. view=label.RelationTypeUploadAPI.as_view(),
  53. name='relation_type-upload'
  54. ),
  55. path(
  56. route='relation_types/<int:relation_type_id>',
  57. view=label.RelationTypeDetail.as_view(),
  58. name='relation_type_detail'
  59. ),
  60. path(
  61. route='tags',
  62. view=tag.TagList.as_view(),
  63. name='tag_list'
  64. ),
  65. path(
  66. route='tags/<int:tag_id>',
  67. view=tag.TagDetail.as_view(),
  68. name='tag_detail'
  69. ),
  70. path(
  71. route='comments',
  72. view=comment.CommentList.as_view(),
  73. name='comment_list'
  74. ),
  75. path(
  76. route='comments/<int:comment_id>',
  77. view=comment.CommentDetail.as_view(),
  78. name='comment_detail'
  79. ),
  80. path(
  81. route='examples/<int:example_id>/states',
  82. view=example_state.ExampleStateList.as_view(),
  83. name='example_state_list'
  84. ),
  85. ]
  86. urlpatterns = [
  87. path(
  88. route='health',
  89. view=health.Health.as_view(),
  90. name='health'
  91. ),
  92. path(
  93. route='projects',
  94. view=project.ProjectList.as_view(),
  95. name='project_list'
  96. ),
  97. path(
  98. route='tasks/status/<task_id>',
  99. view=task.TaskStatus.as_view(),
  100. name='task_status'
  101. ),
  102. path(
  103. route='projects/<int:project_id>',
  104. view=project.ProjectDetail.as_view(),
  105. name='project_detail'
  106. ),
  107. path('projects/<int:project_id>/', include(urlpatterns_project))
  108. ]