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.

30 lines
1.7 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
  1. from django.urls import path
  2. from .views import IndexView
  3. from .views import ProjectView, DatasetView, DatasetUpload, LabelView, StatsView
  4. from .views import ProjectsView, DataDownload
  5. from rest_framework import routers
  6. from .views import ProjectViewSet
  7. from .views import ProjectLabelsAPI, ProjectLabelAPI, ProjectDocsAPI, AnnotationsAPI, AnnotationAPI, ProjectStatsAPI
  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>/stats/', ProjectStatsAPI.as_view(), name='stats-api'),
  13. path('api/projects/<int:project_id>/labels/', ProjectLabelsAPI.as_view(), name='labels'),
  14. path('api/projects/<int:project_id>/labels/<int:label_id>', ProjectLabelAPI.as_view(), name='label'),
  15. path('api/projects/<int:project_id>/docs/', ProjectDocsAPI.as_view(), name='docs'),
  16. path('api/projects/<int:project_id>/docs/<int:doc_id>/annotations/', AnnotationsAPI.as_view(), name='annotations'),
  17. path('api/projects/<int:project_id>/docs/<int:doc_id>/annotations/<int:annotation_id>', AnnotationAPI.as_view(), name='ann'),
  18. path('projects/', ProjectsView.as_view(), name='projects'),
  19. path('projects/<int:project_id>/download', DataDownload.as_view(), name='download'),
  20. path('projects/<int:project_id>/', ProjectView.as_view(), name='annotation'),
  21. path('projects/<int:project_id>/docs/', DatasetView.as_view(), name='dataset'),
  22. path('projects/<int:project_id>/docs/create', DatasetUpload.as_view(), name='upload'),
  23. path('projects/<int:project_id>/labels/', LabelView.as_view(), name='label-management'),
  24. path('projects/<int:project_id>/stats/', StatsView.as_view(), name='stats'),
  25. ]