from django.urls import path from rest_framework.urlpatterns import format_suffix_patterns from .api import ProjectList, ProjectDetail from .api import LabelList, LabelDetail from .api import DocumentList, DocumentDetail from .api import EntityList, EntityDetail from .api import StatisticsAPI urlpatterns = [ path('projects', ProjectList.as_view(), name='project_list'), 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//entities', EntityList.as_view(), name='entity_list'), path('projects//docs//entities/', EntityDetail.as_view(), name='entity_detail'), ] urlpatterns = format_suffix_patterns(urlpatterns, allowed=['json', 'xml'])