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
501e498d
Commit
501e498d
authored
Mar 22, 2019
by
王浩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix pictorial user list
parent
3040a6c4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
star.py
api/star.py
+1
-1
urls.py
api/urls.py
+1
-1
user.py
api/user.py
+5
-5
No files found.
api/star.py
View file @
501e498d
...
...
@@ -88,6 +88,6 @@ class CelebrityRelatedPictorial(APIView):
try
:
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
))
error_logger
.
error
(
u'获取
%
d明星
画报
信息失败
%
s'
%
(
id
,
e
))
raise
return
data
api/urls.py
View file @
501e498d
...
...
@@ -39,7 +39,7 @@ urlpatterns = [
url
(
r'^user/list/update$'
,
UserListView
.
as_view
()),
url
(
r'^user/get$'
,
UserUpdateOrCreate
.
as_view
()),
url
(
r'^user/create$'
,
UserUpdateOrCreate
.
as_view
()),
url
(
r'^user/pictorial/list$'
,
UserPictorialView
.
as_view
()),
url
(
r'^user/pictorial/list$'
,
PictorialUserList
.
as_view
()),
url
(
r'^user/images/get$'
,
UserImage
.
as_view
()),
url
(
r'^user/images/create$'
,
UserImage
.
as_view
()),
...
...
api/user.py
View file @
501e498d
...
...
@@ -85,16 +85,16 @@ class UserUpdateOrCreate(APIView):
}
class
UserPictorialView
(
APIView
):
class
PictorialUserList
(
APIView
):
def
get
(
self
,
request
):
user_id
=
request
.
GET
.
get
(
'id'
)
id_
=
request
.
GET
.
get
(
'id'
)
offset
=
int
(
request
.
GET
.
get
(
'page'
,
0
))
count
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
filters
=
{
'
user_id'
:
user_id
}
filters
=
{
'
pictorial_id'
:
id_
}
try
:
data
=
self
.
rpc
[
'venus/sun/pictorial/user/list'
](
filters
=
filters
,
offset
=
(
offset
-
1
)
*
count
,
limi
t
=
count
)
.
unwrap
()
data
=
self
.
rpc
[
'venus/sun/pictorial/user/list'
](
filters
=
filters
,
offset
=
(
offset
-
1
)
*
count
,
coun
t
=
count
)
.
unwrap
()
except
Exception
as
e
:
error_logger
.
error
(
u'获取画报用户
详情
失败
%
s'
,
e
)
error_logger
.
error
(
u'获取画报用户
列表
失败
%
s'
,
e
)
raise
return
data
...
...
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