from django.urls import path from rest_framework import routers from .views import IndexView from .views import ProjectView, DatasetView, DataUpload, LabelView, StatsView from .views import ProjectsView, DataDownload from .views import DemoTextClassification, DemoNamedEntityRecognition, DemoTranslation from .api import ProjectViewSet, LabelList, ProjectStatsAPI, LabelDetail, \ AnnotationList, AnnotationDetail, DocumentList router = routers.DefaultRouter() router.register(r'projects', ProjectViewSet) urlpatterns = [ path('', IndexView.as_view(), name='index'), path('api/projects//stats/', ProjectStatsAPI.as_view(), name='stats-api'), path('api/projects//labels/', LabelList.as_view(), name='labels'), path('api/projects//labels/', LabelDetail.as_view(), name='label'), path('api/projects//docs/', DocumentList.as_view(), name='docs'), path('api/projects//docs//annotations/', AnnotationList.as_view(), name='annotations'), path('api/projects//docs//annotations/', AnnotationDetail.as_view(), name='ann'), path('projects/', ProjectsView.as_view(), name='projects'), path('projects//download', DataDownload.as_view(), name='download'), path('projects//', ProjectView.as_view(), name='annotation'), path('projects//docs/', DatasetView.as_view(), name='dataset'), path('projects//docs/create', DataUpload.as_view(), name='upload'), path('projects//labels/', LabelView.as_view(), name='label-management'), path('projects//stats/', StatsView.as_view(), name='stats'), path('demo/text-classification/', DemoTextClassification.as_view(), name='demo-text-classification'), path('demo/named-entity-recognition/', DemoNamedEntityRecognition.as_view(), name='demo-named-entity-recognition'), path('demo/translation/', DemoTranslation.as_view(), name='demo-translation'), ]