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
97970a68
Commit
97970a68
authored
Mar 21, 2019
by
王浩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix code
parent
21705bc8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
pictorial.py
api/pictorial.py
+1
-1
star.py
api/star.py
+2
-2
urls.py
api/urls.py
+1
-1
No files found.
api/pictorial.py
View file @
97970a68
...
...
@@ -54,7 +54,7 @@ class PictorialUpdateOrCreate(APIView):
'description'
:
request
.
POST
.
get
(
'description'
,
''
),
'creator_id'
:
request
.
POST
.
get
(
'creator_id'
,
''
),
'celebrity_ids'
:
star_ids
,
'is_online'
:
int
(
request
.
POST
.
get
(
'is_online'
,
0
)),
'is_online'
:
int
(
request
.
POST
.
get
(
'is_online'
,
1
)),
'is_recommend'
:
int
(
request
.
POST
.
get
(
'is_recommend'
,
0
)),
'pictorial_user_ids'
:
pictorial_user_ids
,
'icon'
:
request
.
POST
.
get
(
'icon'
,
''
),
...
...
api/star.py
View file @
97970a68
...
...
@@ -79,14 +79,14 @@ class CelebrityUpdateOrCreate(APIView):
}
class
CelebrityRelated
Group
(
APIView
):
class
CelebrityRelated
Pictorial
(
APIView
):
def
get
(
self
,
request
):
id
=
request
.
GET
.
get
(
'id'
)
offset
=
int
(
request
.
GET
.
get
(
'page'
,
0
))
count
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
filters
=
{
'star_id'
:
id
,
'is_online'
:
True
}
try
:
data
=
self
.
rpc
[
'venus/sun/
group
/list'
](
filters
=
filters
,
offset
=
(
offset
-
1
)
*
count
,
limit
=
count
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/sun/
pictorial
/list'
](
filters
=
filters
,
offset
=
(
offset
-
1
)
*
count
,
limit
=
count
)
.
unwrap
()
except
Exception
as
e
:
error_logger
.
error
(
u'获取
%
d明星小组信息失败
%
s'
%
(
id
,
e
))
raise
...
...
api/urls.py
View file @
97970a68
...
...
@@ -66,7 +66,7 @@ urlpatterns = [
url
(
r'^celebrity/list/update$'
,
CelebrityListView
.
as_view
()),
url
(
r'^celebrity/create$'
,
CelebrityUpdateOrCreate
.
as_view
()),
url
(
r'^celebrity/detail$'
,
CelebrityUpdateOrCreate
.
as_view
()),
url
(
r'^celebrity/celebrity_related_
group_info'
,
CelebrityRelatedGroup
.
as_view
()),
url
(
r'^celebrity/celebrity_related_
pictorial_info'
,
CelebrityRelatedPictorial
.
as_view
()),
# push相关
url
(
r'^push/list$'
,
PushListView
.
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