Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-CloudComputing
/
C_Team_KhuDrive
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
권주희
2020-06-17 19:56:03 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a68c378bbd8ce82fa1655ed142eb3e1748cca407
a68c378b
1 parent
e9ce82ed
change the copied name in copy api
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
backend/api/views.py
backend/api/views.py
View file @
a68c378
...
...
@@ -274,7 +274,8 @@ class ItemViewSet(viewsets.ViewSet):
return
Response
({
'message'
:
'item is not existed.'
},
status
=
status
.
HTTP_204_NO_CONTENT
)
if
child
.
is_folder
==
True
:
return
Response
({
'message'
:
'item is folder'
},
status
=
status
.
HTTP_204_NO_CONTENT
)
copiedName
=
child
.
name
+
"_복사본_"
+
str
(
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M'
))
name
=
child
.
name
.
split
(
"."
)
copiedName
=
name
[
0
]
+
"_복사본_"
+
str
(
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M'
))
+
"."
+
name
[
-
1
]
copiedItem
=
Item
(
is_folder
=
False
,
name
=
copiedName
,
path
=
child
.
path
,
parent
=
parent_id
,
user_id
=
child
.
user_id
,
size
=
child
.
size
,
status
=
child
.
status
)
copiedItem
.
save
()
...
...
Please
register
or
login
to post a comment