urls.py 594 Bytes
from django.urls import path, include
from django.conf.urls import url
from api.views import VideoFileUploadView, VideoFileList
from . import views
from rest_framework.routers import DefaultRouter

router = DefaultRouter()
router.register('db/videofile', views.VideoFileViewSet)
router.register('db/video', views.VideoViewSet)

urlpatterns = [
    # FBV
    path('api/upload', VideoFileUploadView.as_view(), name="file-upload"),
    path('api/upload/<int:pk>/', VideoFileList.as_view(), name="file-list"),
    # path('api/upload', views.VideoFile_Upload),
    path('', include(router.urls)),
]