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
0
Merge Requests
0
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
钟尚武
sun
Commits
f0df3672
Commit
f0df3672
authored
5 years ago
by
钟尚武
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'shangwu/feature-tag' into 'test'
标签编辑增加参数 See merge request
alpha/sun!334
parents
8737f61d
cb6a9a6f
master
dev
like-pre/r01
quick-reply
refactor
test
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
tag.py
api/tag.py
+8
-0
No files found.
api/tag.py
View file @
f0df3672
...
@@ -53,6 +53,12 @@ class TagUpdateOrCreateView(APIView):
...
@@ -53,6 +53,12 @@ class TagUpdateOrCreateView(APIView):
down_tags
=
list
(
set
(
map
(
lambda
x
:
x
.
split
(
":"
)[
0
],
json
.
loads
((
request
.
POST
.
get
(
'down_tags'
,
'[]'
))))))
down_tags
=
list
(
set
(
map
(
lambda
x
:
x
.
split
(
":"
)[
0
],
json
.
loads
((
request
.
POST
.
get
(
'down_tags'
,
'[]'
))))))
up_tags
=
list
(
set
(
map
(
lambda
x
:
x
.
split
(
":"
)[
0
],
json
.
loads
((
request
.
POST
.
get
(
'up_tags'
,
'[]'
))))))
up_tags
=
list
(
set
(
map
(
lambda
x
:
x
.
split
(
":"
)[
0
],
json
.
loads
((
request
.
POST
.
get
(
'up_tags'
,
'[]'
))))))
tagtypes
=
list
(
set
(
map
(
lambda
x
:
x
.
split
(
":"
)[
0
],
json
.
loads
((
request
.
POST
.
get
(
'tagtypes'
,
'[]'
))))))
tagtypes
=
list
(
set
(
map
(
lambda
x
:
x
.
split
(
":"
)[
0
],
json
.
loads
((
request
.
POST
.
get
(
'tagtypes'
,
'[]'
))))))
request
.
POST
.
get
(
'official_pictorial_id'
,
''
)
.
split
(
":"
)
official_pictorial_id
=
request
.
POST
.
get
(
'official_pictorial_id'
,
''
)
.
split
(
":"
)
if
official_pictorial_id
:
official_pictorial_id
=
official_pictorial_id
[
0
]
else
:
official_pictorial_id
=
None
data
=
{
data
=
{
'name'
:
request
.
POST
.
get
(
'name'
)
.
lower
(),
'name'
:
request
.
POST
.
get
(
'name'
)
.
lower
(),
...
@@ -64,6 +70,8 @@ class TagUpdateOrCreateView(APIView):
...
@@ -64,6 +70,8 @@ class TagUpdateOrCreateView(APIView):
'platform'
:
request
.
POST
.
get
(
'platform'
,
1
),
'platform'
:
request
.
POST
.
get
(
'platform'
,
1
),
'collection'
:
request
.
POST
.
get
(
'collection'
,
0
),
'collection'
:
request
.
POST
.
get
(
'collection'
,
0
),
'alias'
:
request
.
POST
.
get
(
'alias'
,
''
),
'alias'
:
request
.
POST
.
get
(
'alias'
,
''
),
'is_core'
:
request
.
POST
.
get
(
'is_core'
,
0
),
'official_pictorial_id'
:
official_pictorial_id
,
'is_show_in_register'
:
request
.
POST
.
get
(
'is_show_in_register'
,
'false'
),
'is_show_in_register'
:
request
.
POST
.
get
(
'is_show_in_register'
,
'false'
),
'pictorial_ids'
:
list
(
'pictorial_ids'
:
list
(
(
map
(
lambda
x
:
int
(
x
.
split
(
":"
)[
0
]),
json
.
loads
((
request
.
POST
.
get
(
'pictorial_ids'
,
'[]'
))))))
(
map
(
lambda
x
:
int
(
x
.
split
(
":"
)[
0
]),
json
.
loads
((
request
.
POST
.
get
(
'pictorial_ids'
,
'[]'
))))))
...
...
This diff is collapsed.
Click to expand it.
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