Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpha
sun
Commits
b73eac41
Commit
b73eac41
authored
Apr 28, 2019
by
王浩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'haow/dev' into 'master'
tools api add post params to suit more data form See merge request
!185
parents
f864ce07
13353ac3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
tools.py
api/tools.py
+7
-4
No files found.
api/tools.py
View file @
b73eac41
...
...
@@ -79,11 +79,14 @@ class BatchCreateTopicWithAiFashionTag(APIView):
def
post
(
self
,
request
):
json_file
=
request
.
FILES
.
get
(
'file'
)
if
not
json_file
:
tag_infos
=
request
.
POST
.
get
(
'tag_infos'
)
if
not
json_file
and
not
tag_infos
:
return
{
'message'
:
u'上传失败,请重新上传'
,
'code'
:
500
}
json_data
=
json
.
load
(
json_file
)
self
.
rpc
[
'venus/sun/tools/batch_create_topic_with_ai_fashion_tag'
](
infos
=
json_data
)
.
unwrap
()
if
json_file
:
json_data
=
json
.
load
(
json_file
)
self
.
rpc
[
'venus/sun/tools/batch_create_topic_with_ai_fashion_tag'
](
infos
=
json_data
)
.
unwrap
()
if
tag_infos
:
self
.
rpc
[
'venus/sun/tools/batch_create_topic_with_ai_fashion_tag'
](
infos
=
tag_infos
)
.
unwrap
()
return
{
'message'
:
u'上传成功'
,
'code'
:
200
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment