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.

196 lines
5.0 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. from django.urls import include, path
  2. from . import views
  3. urlpatterns_project = [
  4. path(
  5. route='upload',
  6. view=views.UploadAPI.as_view(),
  7. name='upload'
  8. ),
  9. path(
  10. route='catalog',
  11. view=views.DatasetCatalog.as_view(),
  12. name='catalog'
  13. ),
  14. path(
  15. route='download-format',
  16. view=views.DownloadDatasetCatalog.as_view(),
  17. name='download-format'
  18. ),
  19. path(
  20. route='download',
  21. view=views.DownloadAPI.as_view(),
  22. name='download-dataset'
  23. ),
  24. path(
  25. route='statistics',
  26. view=views.StatisticsAPI.as_view(),
  27. name='statistics'),
  28. path(
  29. route='labels',
  30. view=views.LabelList.as_view(),
  31. name='label_list'
  32. ),
  33. path(
  34. route='label-upload',
  35. view=views.LabelUploadAPI.as_view(),
  36. name='label_upload'
  37. ),
  38. path(
  39. route='labels/<int:label_id>',
  40. view=views.LabelDetail.as_view(),
  41. name='label_detail'
  42. ),
  43. path(
  44. route='docs',
  45. view=views.DocumentList.as_view(),
  46. name='doc_list'
  47. ),
  48. path(
  49. route='docs/<int:doc_id>',
  50. view=views.DocumentDetail.as_view(),
  51. name='doc_detail'
  52. ),
  53. path(
  54. route='docs/<int:doc_id>/approve-labels',
  55. view=views.ApproveLabelsAPI.as_view(),
  56. name='approve_labels'
  57. ),
  58. path(
  59. route='docs/<int:doc_id>/annotations',
  60. view=views.AnnotationList.as_view(),
  61. name='annotation_list'
  62. ),
  63. path(
  64. route='docs/<int:doc_id>/annotations/<int:annotation_id>',
  65. view=views.AnnotationDetail.as_view(),
  66. name='annotation_detail'
  67. ),
  68. path(
  69. route='tags',
  70. view=views.TagList.as_view(),
  71. name='tag_list'
  72. ),
  73. path(
  74. route='tags/<int:tag_id>',
  75. view=views.TagDetail.as_view(),
  76. name='tag_detail'
  77. ),
  78. path(
  79. route='docs/<int:doc_id>/comments',
  80. view=views.CommentListDoc.as_view(),
  81. name='comment_list_doc'
  82. ),
  83. path(
  84. route='comments',
  85. view=views.CommentListProject.as_view(),
  86. name='comment_list_project'
  87. ),
  88. path(
  89. route='docs/<int:doc_id>/comments/<int:comment_id>',
  90. view=views.CommentDetail.as_view(),
  91. name='comment_detail'
  92. ),
  93. path(
  94. route='roles',
  95. view=views.RoleMappingList.as_view(),
  96. name='rolemapping_list'
  97. ),
  98. path(
  99. route='roles/<int:rolemapping_id>',
  100. view=views.RoleMappingDetail.as_view(),
  101. name='rolemapping_detail'
  102. ),
  103. path(
  104. route='auto-labeling-templates',
  105. view=views.AutoLabelingTemplateListAPI.as_view(),
  106. name='auto_labeling_templates'
  107. ),
  108. path(
  109. route='auto-labeling-templates/<str:option_name>',
  110. view=views.AutoLabelingTemplateDetailAPI.as_view(),
  111. name='auto_labeling_template'
  112. ),
  113. path(
  114. route='auto-labeling-configs',
  115. view=views.AutoLabelingConfigList.as_view(),
  116. name='auto_labeling_configs'
  117. ),
  118. path(
  119. route='auto-labeling-configs/<int:config_id>',
  120. view=views.AutoLabelingConfigDetail.as_view(),
  121. name='auto_labeling_config'
  122. ),
  123. path(
  124. route='auto-labeling-config-testing',
  125. view=views.AutoLabelingConfigTest.as_view(),
  126. name='auto_labeling_config_test'
  127. ),
  128. path(
  129. route='docs/<int:doc_id>/auto-labeling',
  130. view=views.AutoLabelingAnnotation.as_view(),
  131. name='auto_labeling_annotation'
  132. ),
  133. path(
  134. route='auto-labeling-template-testing',
  135. view=views.AutoLabelingTemplateTest.as_view(),
  136. name='auto_labeling_template_test'
  137. ),
  138. path(
  139. route='auto-labeling-mapping-testing',
  140. view=views.AutoLabelingMappingTest.as_view(),
  141. name='auto_labeling_mapping_test'
  142. )
  143. ]
  144. urlpatterns = [
  145. path(
  146. route='health',
  147. view=views.Health.as_view(),
  148. name='health'
  149. ),
  150. path('auth/', include('dj_rest_auth.urls')),
  151. path('fp/', include('django_drf_filepond.urls')),
  152. path(
  153. route='me',
  154. view=views.Me.as_view(),
  155. name='me'
  156. ),
  157. path(
  158. route='features',
  159. view=views.Features.as_view(),
  160. name='features'
  161. ),
  162. path(
  163. route='projects',
  164. view=views.ProjectList.as_view(),
  165. name='project_list'
  166. ),
  167. path(
  168. route='users',
  169. view=views.Users.as_view(),
  170. name='user_list'
  171. ),
  172. path(
  173. route='roles',
  174. view=views.Roles.as_view(),
  175. name='roles'
  176. ),
  177. path(
  178. route='auto-labeling-parameter-testing',
  179. view=views.AutoLabelingConfigParameterTest.as_view(),
  180. name='auto_labeling_parameter_testing'
  181. ),
  182. path(
  183. route='tasks/status/<task_id>',
  184. view=views.TaskStatus.as_view(),
  185. name='task_status'
  186. ),
  187. path(
  188. route='projects/<int:project_id>',
  189. view=views.ProjectDetail.as_view(),
  190. name='project_detail'
  191. ),
  192. path('projects/<int:project_id>/', include(urlpatterns_project))
  193. ]