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
8722e6e9
Commit
8722e6e9
authored
Mar 22, 2019
by
李延哲
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix/del_question' into 'test'
问题修改 See merge request
!130
parents
1682a6ae
feadb4ca
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
tag.py
api/tag.py
+14
-1
urls.py
api/urls.py
+1
-0
No files found.
api/tag.py
View file @
8722e6e9
...
@@ -61,7 +61,8 @@ class TagUpdateOrCreateView(APIView):
...
@@ -61,7 +61,8 @@ class TagUpdateOrCreateView(APIView):
'icon_url'
:
request
.
POST
.
get
(
'icon_url'
,
''
)[:
-
2
],
'icon_url'
:
request
.
POST
.
get
(
'icon_url'
,
''
)[:
-
2
],
'platform'
:
request
.
POST
.
get
(
'platform'
),
'platform'
:
request
.
POST
.
get
(
'platform'
),
'collection'
:
request
.
POST
.
get
(
'collection'
),
'collection'
:
request
.
POST
.
get
(
'collection'
),
'alias'
:
request
.
POST
.
get
(
'alias'
)
'alias'
:
request
.
POST
.
get
(
'alias'
),
'is_show_in_register'
:
request
.
POST
.
get
(
'is_show_in_register'
)
}
}
try
:
try
:
data
=
self
.
rpc
[
'venus/sun/tag/edit'
](
id
=
id
,
data
=
data
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/sun/tag/edit'
](
id
=
id
,
data
=
data
)
.
unwrap
()
...
@@ -122,3 +123,15 @@ class TagTypeUpdateOrCreateView(APIView):
...
@@ -122,3 +123,15 @@ class TagTypeUpdateOrCreateView(APIView):
error_logger
.
error
(
u'创建/编辑标签类型
%
d信息失败
%
s'
%
(
id
,
e
))
error_logger
.
error
(
u'创建/编辑标签类型
%
d信息失败
%
s'
%
(
id
,
e
))
raise
raise
return
data
return
data
class
TagRegisterUpdateView
(
APIView
):
def
post
(
self
,
request
):
ids
=
request
.
POST
.
get
(
'tag_ids'
)
try
:
self
.
rpc
[
'venus/sun/tag/refister_tag/update'
](
ids
=
ids
)
.
unwrap
()
except
Exception
as
e
:
error_logger
.
error
(
u'配置失败'
)
raise
return
{
'msg'
:
'更改成功'
}
api/urls.py
View file @
8722e6e9
...
@@ -84,6 +84,7 @@ urlpatterns = [
...
@@ -84,6 +84,7 @@ urlpatterns = [
url
(
r'^tag/list/update$'
,
TagListView
.
as_view
()),
url
(
r'^tag/list/update$'
,
TagListView
.
as_view
()),
url
(
r'^tag/create$'
,
TagUpdateOrCreateView
.
as_view
()),
url
(
r'^tag/create$'
,
TagUpdateOrCreateView
.
as_view
()),
url
(
r'^tag/detail$'
,
TagUpdateOrCreateView
.
as_view
()),
url
(
r'^tag/detail$'
,
TagUpdateOrCreateView
.
as_view
()),
url
(
r'^tag/register_show/update$'
,
TagRegisterUpdateView
.
as_view
()),
# 标签类型相关
# 标签类型相关
url
(
r'^tag/tagtype/list$'
,
TagTypeListView
.
as_view
()),
url
(
r'^tag/tagtype/list$'
,
TagTypeListView
.
as_view
()),
...
...
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