From dd659908ffb3c963aa44fc7c1e4bebd979d31f44 Mon Sep 17 00:00:00 2001 From: sniper-py Date: Thu, 4 Jul 2019 16:16:07 +0800 Subject: [PATCH] move dtable share and file participants api file --- seahub/{dtable/api.py => api2/endpoints/dtable_share.py} | 0 .../api.py => api2/endpoints/file_participants.py} | 2 +- seahub/urls.py | 4 ++-- .../dtable/test_api.py => api/endpoints/test_dtable_share.py} | 0 .../test_api.py => api/endpoints/test_file_participants.py} | 0 5 files changed, 3 insertions(+), 3 deletions(-) rename seahub/{dtable/api.py => api2/endpoints/dtable_share.py} (100%) rename seahub/{file_participants/api.py => api2/endpoints/file_participants.py} (98%) rename tests/{seahub/dtable/test_api.py => api/endpoints/test_dtable_share.py} (100%) rename tests/{seahub/file_participants/test_api.py => api/endpoints/test_file_participants.py} (100%) diff --git a/seahub/dtable/api.py b/seahub/api2/endpoints/dtable_share.py similarity index 100% rename from seahub/dtable/api.py rename to seahub/api2/endpoints/dtable_share.py diff --git a/seahub/file_participants/api.py b/seahub/api2/endpoints/file_participants.py similarity index 98% rename from seahub/file_participants/api.py rename to seahub/api2/endpoints/file_participants.py index 7a164894ec..4f5254a4d9 100644 --- a/seahub/file_participants/api.py +++ b/seahub/api2/endpoints/file_participants.py @@ -13,7 +13,7 @@ from django.utils.translation import ugettext as _ from seahub.api2.authentication import TokenAuthentication from seahub.api2.throttling import UserRateThrottle from seahub.api2.utils import api_error, get_user_common_info -from .models import FileParticipant +from seahub.file_participants.models import FileParticipant from seahub.utils import normalize_file_path, is_valid_username from seahub.views import check_folder_permission from seahub.base.accounts import User diff --git a/seahub/urls.py b/seahub/urls.py index 9baeb5b565..1f48efa364 100644 --- a/seahub/urls.py +++ b/seahub/urls.py @@ -91,7 +91,7 @@ from seahub.api2.endpoints.starred_items import StarredItems from seahub.api2.endpoints.markdown_lint import MarkdownLintView from seahub.api2.endpoints.dtable import WorkspacesView, DTableView, DTablesView, \ DTableUpdateLinkView, DTableAssetUploadLinkView, dtable_file_view, dtable_asset_access -from seahub.dtable.api import SharedDTablesView, DTableShareView +from seahub.api2.endpoints.dtable_share import SharedDTablesView, DTableShareView # Admin from seahub.api2.endpoints.admin.revision_tag import AdminTaggedItemsView @@ -144,7 +144,7 @@ from seahub.api2.endpoints.admin.file_scan_records import AdminFileScanRecords from seahub.api2.endpoints.admin.notifications import AdminNotificationsView from seahub.api2.endpoints.admin.work_weixin import AdminWorkWeixinDepartments, \ AdminWorkWeixinDepartmentMembers, AdminWorkWeixinUsersBatch -from seahub.file_participants.api import FileParticipantsView, FileParticipantView +from seahub.api2.endpoints.file_participants import FileParticipantsView, FileParticipantView urlpatterns = [ url(r'^accounts/', include('seahub.base.registration_urls')), diff --git a/tests/seahub/dtable/test_api.py b/tests/api/endpoints/test_dtable_share.py similarity index 100% rename from tests/seahub/dtable/test_api.py rename to tests/api/endpoints/test_dtable_share.py diff --git a/tests/seahub/file_participants/test_api.py b/tests/api/endpoints/test_file_participants.py similarity index 100% rename from tests/seahub/file_participants/test_api.py rename to tests/api/endpoints/test_file_participants.py