akarpov/akarpov/files/urls.py

47 lines
1.6 KiB
Python
Raw Normal View History

from django.urls import path
2023-03-27 16:15:03 +03:00
from akarpov.files.views import (
2023-04-24 15:26:59 +03:00
ChunkedUploadCompleteView,
ChunkedUploadView,
2023-04-06 14:41:10 +03:00
TopFolderView,
delete_file_view,
2023-04-26 13:47:02 +03:00
delete_folder_view,
2023-06-21 17:02:53 +03:00
file_download_view,
2023-04-24 15:26:59 +03:00
file_report_list,
file_table,
file_update,
2023-03-27 16:15:03 +03:00
files_view,
folder_create,
2023-04-26 13:47:02 +03:00
folder_update,
2023-03-27 16:15:03 +03:00
folder_view,
2023-04-24 15:26:59 +03:00
report_file,
2023-03-27 16:15:03 +03:00
)
app_name = "files"
urlpatterns = [
2023-04-06 14:41:10 +03:00
path("", TopFolderView.as_view(), name="main"),
path("table/", file_table, name="table"),
2023-04-24 15:26:59 +03:00
path("reports/", file_report_list, name="reports"),
2023-03-27 16:15:03 +03:00
path(
"api/chunked_upload_complete/",
2023-04-24 15:26:59 +03:00
ChunkedUploadCompleteView.as_view(),
2023-03-27 16:15:03 +03:00
name="api_chunked_upload_complete",
),
2023-04-24 01:07:11 +03:00
path(
"api/chunked_upload_complete/<str:slug>",
2023-04-24 15:26:59 +03:00
ChunkedUploadCompleteView.as_view(),
2023-04-24 01:07:11 +03:00
name="api_chunked_upload_complete_folder",
),
2023-04-24 15:26:59 +03:00
path("api/chunked_upload/", ChunkedUploadView.as_view(), name="api_chunked_upload"),
path("api/folder/create/", folder_create, name="folder_create"),
2023-04-24 15:26:59 +03:00
path("api/file/report/<str:slug>", report_file, name="file_report"),
2023-06-21 17:02:53 +03:00
path("api/file/download/<str:slug>", file_download_view, name="file_download"),
2023-04-26 13:47:02 +03:00
path("api/file/delete/<str:slug>", delete_file_view, name="delete"),
path("api/folder/create/<str:slug>", folder_create, name="sub_folder_create"),
2023-04-26 13:47:02 +03:00
path("api/folder/delete/<str:slug>", delete_folder_view, name="folder_delete"),
path("<str:slug>", files_view, name="view"),
path("<str:slug>/update", file_update, name="update"),
path("f/<str:slug>", folder_view, name="folder"),
2023-04-26 13:47:02 +03:00
path("f/<str:slug>/update", folder_update, name="folder_update"),
]