Browse Source

Move upload view

pull/1310/head
Hironsan 3 years ago
parent
commit
c4f27f97b1
4 changed files with 8 additions and 8 deletions
  1. 4
      app/api/urls.py
  2. 2
      app/api/views/__init__.py
  3. 8
      app/api/views/import_dataset.py
  4. 2
      app/api/views/upload/__init__.py

4
app/api/urls.py

@ -5,12 +5,12 @@ from . import views
urlpatterns_project = [
path(
route='upload',
view=views.upload.view.UploadAPI.as_view(),
view=views.UploadAPI.as_view(),
name='upload'
),
path(
route='catalog',
view=views.upload.view.DatasetCatalog.as_view(),
view=views.DatasetCatalog.as_view(),
name='catalog'
),
path(

2
app/api/views/__init__.py

@ -4,11 +4,11 @@ from .comment import *
from .document import *
from .export_dataset import *
from .health import *
from .import_dataset import *
from .import_export import *
from .label import *
from .project import *
from .role import *
from .statistics import *
from .task import *
from .upload import *
from .user import *

app/api/views/upload/view.py → app/api/views/import_dataset.py

@ -8,10 +8,10 @@ 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 injest_data
from .catalog import Options
from ..models import Project
from ..permissions import IsProjectAdmin
from ..tasks import injest_data
from .upload.catalog import Options
class DatasetCatalog(APIView):

2
app/api/views/upload/__init__.py

@ -1 +1 @@
from . import view
Loading…
Cancel
Save