|
|
@ -5,7 +5,7 @@ from .views import IndexView |
|
|
|
from .views import ProjectView, DatasetView, DataUpload, LabelView, StatsView |
|
|
|
from .views import ProjectsView, DataDownload |
|
|
|
from .api import ProjectViewSet, LabelList, ProjectStatsAPI, LabelDetail, ProjectDocsAPI, \ |
|
|
|
AnnotationsAPI, AnnotationAPI, DocumentList |
|
|
|
AnnotationList, AnnotationDetail, DocumentList |
|
|
|
|
|
|
|
router = routers.DefaultRouter() |
|
|
|
router.register(r'projects', ProjectViewSet) |
|
|
@ -18,8 +18,8 @@ urlpatterns = [ |
|
|
|
path('api/projects/<int:project_id>/labels/<int:label_id>', LabelDetail.as_view(), name='label'), |
|
|
|
path('api/projects/<int:project_id>/docs/', ProjectDocsAPI.as_view(), name='docs'), |
|
|
|
path('api/projects/<int:project_id>/texts/', DocumentList.as_view(), name='texts'), |
|
|
|
path('api/projects/<int:project_id>/docs/<int:doc_id>/annotations/', AnnotationsAPI.as_view(), name='annotations'), |
|
|
|
path('api/projects/<int:project_id>/docs/<int:doc_id>/annotations/<int:annotation_id>', AnnotationAPI.as_view(), name='ann'), |
|
|
|
path('api/projects/<int:project_id>/docs/<int:doc_id>/annotations/', AnnotationList.as_view(), name='annotations'), |
|
|
|
path('api/projects/<int:project_id>/docs/<int:doc_id>/annotations/<int:annotation_id>', AnnotationDetail.as_view(), name='ann'), |
|
|
|
path('projects/', ProjectsView.as_view(), name='projects'), |
|
|
|
path('projects/<int:project_id>/download', DataDownload.as_view(), name='download'), |
|
|
|
path('projects/<int:project_id>/', ProjectView.as_view(), name='annotation'), |
|
|
|