Commit e6c1e0b0 authored by 王浩's avatar 王浩

Merge branch 'haow/dev' into 'test'

fix pictorial user list

See merge request alpha/sun!132
parents 488a6950 a9f47248
......@@ -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
......@@ -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()),
......
......@@ -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, limit=count).unwrap()
data = self.rpc['venus/sun/pictorial/user/list'](filters=filters, offset=(offset - 1) * count, count=count).unwrap()
except Exception as e:
error_logger.error(u'获取画报用户详情失败%s' , e)
error_logger.error(u'获取画报用户列表失败%s' , e)
raise
return data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment