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.

27 lines
1.4 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. from django.urls import path
  2. from .views import IndexView
  3. from .views import ProjectView
  4. from .views import ProjectsView, ProjectAdminView, RawDataAPI, DataDownloadAPI
  5. from rest_framework import routers
  6. from .views import ProjectViewSet
  7. from .views import ProjectLabelsAPI, ProjectLabelAPI, ProjectDocsAPI, AnnotationsAPI, AnnotationAPI
  8. router = routers.DefaultRouter()
  9. router.register(r'projects', ProjectViewSet)
  10. urlpatterns = [
  11. path('', IndexView.as_view(), name='index'),
  12. path('api/projects/<int:project_id>/labels/', ProjectLabelsAPI.as_view(), name='labels'),
  13. path('api/projects/<int:project_id>/labels/<int:label_id>', ProjectLabelAPI.as_view(), name='label'),
  14. path('api/projects/<int:project_id>/docs/', ProjectDocsAPI.as_view(), name='docs'),
  15. path('api/projects/<int:project_id>/docs/<int:doc_id>/annotations/', AnnotationsAPI.as_view()),
  16. path('api/projects/<int:project_id>/docs/<int:doc_id>/annotations/<int:annotation_id>', AnnotationAPI.as_view()),
  17. path('projects/', ProjectsView.as_view(), name='projects'),
  18. path('projects/<int:pk>/admin', ProjectAdminView.as_view(), name='project-admin'),
  19. path('projects/<int:project_id>/download', DataDownloadAPI.as_view(), name='download'),
  20. path('projects/<int:project_id>/', ProjectView.as_view(), name='annotation'),
  21. path('projects/<int:pk>/apis/raw_data', RawDataAPI.as_view(), name='data_api'),
  22. ]