from django.urls import path from rest_framework.authtoken.views import obtain_auth_token from rest_framework.urlpatterns import format_suffix_patterns from .views import Me, Features, Users from .views import ProjectList, ProjectDetail from .views import LabelList, LabelDetail, ApproveLabelsAPI from .views import DocumentList, DocumentDetail from .views import AnnotationList, AnnotationDetail from .views import CommentList, CommentDetail from .views import TextUploadAPI, TextDownloadAPI, CloudUploadAPI from .views import StatisticsAPI from .views import RoleMappingList, RoleMappingDetail, Roles urlpatterns = [ path('auth-token', obtain_auth_token), path('me', Me.as_view(), name='me'), path('features', Features.as_view(), name='features'), path('cloud-upload', CloudUploadAPI.as_view(), name='cloud_uploader'), path('projects', ProjectList.as_view(), name='project_list'), path('users', Users.as_view(), name='user_list'), path('roles', Roles.as_view(), name='roles'), path('projects/', ProjectDetail.as_view(), name='project_detail'), path('projects//statistics', StatisticsAPI.as_view(), name='statistics'), path('projects//labels', LabelList.as_view(), name='label_list'), path('projects//labels/', LabelDetail.as_view(), name='label_detail'), path('projects//docs', DocumentList.as_view(), name='doc_list'), path('projects//docs/', DocumentDetail.as_view(), name='doc_detail'), path('projects//docs//approve-labels', ApproveLabelsAPI.as_view(), name='approve_labels'), path('projects//docs//annotations', AnnotationList.as_view(), name='annotation_list'), path('projects//docs//annotations/', AnnotationDetail.as_view(), name='annotation_detail'), path('projects//docs//comments', CommentList.as_view(), name='comment_list'), path('projects//docs//comments/', CommentDetail.as_view(), name='comment_detail'), path('projects//docs/upload', TextUploadAPI.as_view(), name='doc_uploader'), path('projects//docs/download', TextDownloadAPI.as_view(), name='doc_downloader'), path('projects//roles', RoleMappingList.as_view(), name='rolemapping_list'), path('projects//roles/', RoleMappingDetail.as_view(), name='rolemapping_detail'), ] urlpatterns = format_suffix_patterns(urlpatterns, allowed=['json', 'xml'])