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.

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