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.

206 lines
5.2 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
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='images',
  55. view=views.ImageList.as_view(),
  56. name='image_list'
  57. ),
  58. path(
  59. route='images/<int:image_id>',
  60. view=views.ImageDetail.as_view(),
  61. name='image_detail'
  62. ),
  63. path(
  64. route='approval/<int:data_id>',
  65. view=views.ApprovalAPI.as_view(),
  66. name='approve_labels'
  67. ),
  68. path(
  69. route='docs/<int:doc_id>/annotations',
  70. view=views.AnnotationList.as_view(),
  71. name='annotation_list'
  72. ),
  73. path(
  74. route='docs/<int:doc_id>/annotations/<int:annotation_id>',
  75. view=views.AnnotationDetail.as_view(),
  76. name='annotation_detail'
  77. ),
  78. path(
  79. route='tags',
  80. view=views.TagList.as_view(),
  81. name='tag_list'
  82. ),
  83. path(
  84. route='tags/<int:tag_id>',
  85. view=views.TagDetail.as_view(),
  86. name='tag_detail'
  87. ),
  88. path(
  89. route='docs/<int:doc_id>/comments',
  90. view=views.CommentListDoc.as_view(),
  91. name='comment_list_doc'
  92. ),
  93. path(
  94. route='comments',
  95. view=views.CommentListProject.as_view(),
  96. name='comment_list_project'
  97. ),
  98. path(
  99. route='docs/<int:doc_id>/comments/<int:comment_id>',
  100. view=views.CommentDetail.as_view(),
  101. name='comment_detail'
  102. ),
  103. path(
  104. route='roles',
  105. view=views.RoleMappingList.as_view(),
  106. name='rolemapping_list'
  107. ),
  108. path(
  109. route='roles/<int:rolemapping_id>',
  110. view=views.RoleMappingDetail.as_view(),
  111. name='rolemapping_detail'
  112. ),
  113. path(
  114. route='auto-labeling-templates',
  115. view=views.AutoLabelingTemplateListAPI.as_view(),
  116. name='auto_labeling_templates'
  117. ),
  118. path(
  119. route='auto-labeling-templates/<str:option_name>',
  120. view=views.AutoLabelingTemplateDetailAPI.as_view(),
  121. name='auto_labeling_template'
  122. ),
  123. path(
  124. route='auto-labeling-configs',
  125. view=views.AutoLabelingConfigList.as_view(),
  126. name='auto_labeling_configs'
  127. ),
  128. path(
  129. route='auto-labeling-configs/<int:config_id>',
  130. view=views.AutoLabelingConfigDetail.as_view(),
  131. name='auto_labeling_config'
  132. ),
  133. path(
  134. route='auto-labeling-config-testing',
  135. view=views.AutoLabelingConfigTest.as_view(),
  136. name='auto_labeling_config_test'
  137. ),
  138. path(
  139. route='docs/<int:doc_id>/auto-labeling',
  140. view=views.AutoLabelingAnnotation.as_view(),
  141. name='auto_labeling_annotation'
  142. ),
  143. path(
  144. route='auto-labeling-template-testing',
  145. view=views.AutoLabelingTemplateTest.as_view(),
  146. name='auto_labeling_template_test'
  147. ),
  148. path(
  149. route='auto-labeling-mapping-testing',
  150. view=views.AutoLabelingMappingTest.as_view(),
  151. name='auto_labeling_mapping_test'
  152. )
  153. ]
  154. urlpatterns = [
  155. path(
  156. route='health',
  157. view=views.Health.as_view(),
  158. name='health'
  159. ),
  160. path('auth/', include('dj_rest_auth.urls')),
  161. path('fp/', include('django_drf_filepond.urls')),
  162. path(
  163. route='me',
  164. view=views.Me.as_view(),
  165. name='me'
  166. ),
  167. path(
  168. route='features',
  169. view=views.Features.as_view(),
  170. name='features'
  171. ),
  172. path(
  173. route='projects',
  174. view=views.ProjectList.as_view(),
  175. name='project_list'
  176. ),
  177. path(
  178. route='users',
  179. view=views.Users.as_view(),
  180. name='user_list'
  181. ),
  182. path(
  183. route='roles',
  184. view=views.Roles.as_view(),
  185. name='roles'
  186. ),
  187. path(
  188. route='auto-labeling-parameter-testing',
  189. view=views.AutoLabelingConfigParameterTest.as_view(),
  190. name='auto_labeling_parameter_testing'
  191. ),
  192. path(
  193. route='tasks/status/<task_id>',
  194. view=views.TaskStatus.as_view(),
  195. name='task_status'
  196. ),
  197. path(
  198. route='projects/<int:project_id>',
  199. view=views.ProjectDetail.as_view(),
  200. name='project_detail'
  201. ),
  202. path('projects/<int:project_id>/', include(urlpatterns_project))
  203. ]