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.

208 lines
5.3 KiB

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