Browse Source

Rename upload view

pull/10/head
Hironsan 6 years ago
parent
commit
4789ac7e85
2 changed files with 3 additions and 3 deletions
  1. 4
      app/server/urls.py
  2. 2
      app/server/views.py

4
app/server/urls.py

@ -1,7 +1,7 @@
from django.urls import path from django.urls import path
from .views import IndexView from .views import IndexView
from .views import ProjectView, DatasetView, DatasetUpload, LabelView, StatsView
from .views import ProjectView, DatasetView, DataUpload, LabelView, StatsView
from .views import ProjectsView, DataDownload from .views import ProjectsView, DataDownload
from rest_framework import routers from rest_framework import routers
from .views import ProjectViewSet from .views import ProjectViewSet
@ -24,7 +24,7 @@ urlpatterns = [
path('projects/<int:project_id>/download', DataDownload.as_view(), name='download'), path('projects/<int:project_id>/download', DataDownload.as_view(), name='download'),
path('projects/<int:project_id>/', ProjectView.as_view(), name='annotation'), path('projects/<int:project_id>/', ProjectView.as_view(), name='annotation'),
path('projects/<int:project_id>/docs/', DatasetView.as_view(), name='dataset'), path('projects/<int:project_id>/docs/', DatasetView.as_view(), name='dataset'),
path('projects/<int:project_id>/docs/create', DatasetUpload.as_view(), name='upload'),
path('projects/<int:project_id>/docs/create', DataUpload.as_view(), name='upload'),
path('projects/<int:project_id>/labels/', LabelView.as_view(), name='label-management'), path('projects/<int:project_id>/labels/', LabelView.as_view(), name='label-management'),
path('projects/<int:project_id>/stats/', StatsView.as_view(), name='stats'), path('projects/<int:project_id>/stats/', StatsView.as_view(), name='stats'),
] ]

2
app/server/views.py

@ -77,7 +77,7 @@ class StatsView(SuperUserMixin, LoginRequiredMixin, TemplateView):
template_name = 'admin/stats.html' template_name = 'admin/stats.html'
class DatasetUpload(SuperUserMixin, LoginRequiredMixin, TemplateView):
class DataUpload(SuperUserMixin, LoginRequiredMixin, TemplateView):
model = Project model = Project
template_name = 'admin/dataset_upload.html' template_name = 'admin/dataset_upload.html'

Loading…
Cancel
Save