|
@ -1,37 +1,13 @@ |
|
|
from django.urls import path |
|
|
from django.urls import path |
|
|
from rest_framework import routers |
|
|
|
|
|
|
|
|
|
|
|
from .views import IndexView |
|
|
from .views import IndexView |
|
|
from .views import ProjectView, DatasetView, DataUpload, LabelView, StatsView, GuidelineView |
|
|
from .views import ProjectView, DatasetView, DataUpload, LabelView, StatsView, GuidelineView |
|
|
from .views import ProjectsView, DataDownload, DataDownloadFile |
|
|
from .views import ProjectsView, DataDownload, DataDownloadFile |
|
|
from .views import DemoTextClassification, DemoNamedEntityRecognition, DemoTranslation |
|
|
from .views import DemoTextClassification, DemoNamedEntityRecognition, DemoTranslation |
|
|
from .api import ProjectList, ProjectDetail |
|
|
|
|
|
from .api import LabelList, LabelDetail |
|
|
|
|
|
from .api import DocumentList, DocumentDetail |
|
|
|
|
|
from .api import EntityList, EntityDetail |
|
|
|
|
|
from .api import StatisticsAPI |
|
|
|
|
|
|
|
|
|
|
|
router = routers.DefaultRouter() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
urlpatterns = [ |
|
|
urlpatterns = [ |
|
|
path('', IndexView.as_view(), name='index'), |
|
|
path('', IndexView.as_view(), name='index'), |
|
|
path('api/projects/', ProjectList.as_view(), name='project_list'), |
|
|
|
|
|
path('api/projects/<int:project_id>', ProjectDetail.as_view(), name='project_detail'), |
|
|
|
|
|
path('api/projects/<int:project_id>/statistics/', |
|
|
|
|
|
StatisticsAPI.as_view(), name='statistics'), |
|
|
|
|
|
path('api/projects/<int:project_id>/labels/', |
|
|
|
|
|
LabelList.as_view(), name='label_list'), |
|
|
|
|
|
path('api/projects/<int:project_id>/labels/<int:label_id>/', |
|
|
|
|
|
LabelDetail.as_view(), name='label_detail'), |
|
|
|
|
|
path('api/projects/<int:project_id>/docs/', |
|
|
|
|
|
DocumentList.as_view(), name='doc_list'), |
|
|
|
|
|
path('api/projects/<int:project_id>/docs/<int:doc_id>/', |
|
|
|
|
|
DocumentDetail.as_view(), name='doc_detail'), |
|
|
|
|
|
path('api/projects/<int:project_id>/docs/<int:doc_id>/entities', |
|
|
|
|
|
EntityList.as_view(), name='entity_list'), |
|
|
|
|
|
path('api/projects/<int:project_id>/docs/<int:doc_id>/entities/<int:entity_id>/', |
|
|
|
|
|
EntityDetail.as_view(), name='entity_detail'), |
|
|
|
|
|
path('projects/', ProjectsView.as_view(), name='projects'), |
|
|
path('projects/', ProjectsView.as_view(), name='projects'), |
|
|
path('projects/<int:project_id>/download', |
|
|
path('projects/<int:project_id>/download', |
|
|
DataDownload.as_view(), name='download'), |
|
|
DataDownload.as_view(), name='download'), |
|
|