diff --git a/app/api/urls.py b/app/api/urls.py index 19614225..667626aa 100644 --- a/app/api/urls.py +++ b/app/api/urls.py @@ -13,6 +13,16 @@ urlpatterns_project = [ view=views.upload.view.DatasetCatalog.as_view(), name='catalog' ), + path( + route='download-format', + view=views.DownloadDatasetCatalog.as_view(), + name='download-format' + ), + path( + route='export', + view=views.DownloadAPI.as_view(), + name='export-dataset' + ), path( route='statistics', view=views.StatisticsAPI.as_view(), diff --git a/app/api/views/__init__.py b/app/api/views/__init__.py index 1210f02f..aee8b53a 100644 --- a/app/api/views/__init__.py +++ b/app/api/views/__init__.py @@ -2,6 +2,7 @@ from .annotation import * from .auto_labeling import * from .comment import * from .document import * +from .export_dataset import * from .health import * from .import_export import * from .label import * diff --git a/app/api/views/download/view.py b/app/api/views/export_dataset.py similarity index 87% rename from app/api/views/download/view.py rename to app/api/views/export_dataset.py index f470be94..d87ed9d5 100644 --- a/app/api/views/download/view.py +++ b/app/api/views/export_dataset.py @@ -6,13 +6,13 @@ from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.views import APIView -from ...models import Project -from ...permissions import IsProjectAdmin -from ...tasks import export_dataset -from .catalog import Options +from ..models import Project +from ..permissions import IsProjectAdmin +from ..tasks import export_dataset +from .download.catalog import Options -class DatasetCatalog(APIView): +class DownloadDatasetCatalog(APIView): permission_classes = [IsAuthenticated & IsProjectAdmin] def get(self, request, *args, **kwargs):