Commit dedc177b authored by haowang's avatar haowang

fix code

parent 689498c1
......@@ -147,3 +147,19 @@ class PictorialFeedDelete(APIView):
return {
'message': '删除成功'
}
class PictorialTopicList(APIView):
"""获取榜单帖子列表"""
def get(self, request):
id_ = request.GET.get('id')
offset = int(request.GET.get('page', 1))
limit = int(request.GET.get('count', 10))
try:
data = self.rpc['venus/sun/pictorial/topic/list'](id_=id_, offset=(offset-1)*limit, limit=limit).unwrap()
except Exception as e:
error_logger.error(u'获取信息失败%s' % (e))
raise
return data
......@@ -187,3 +187,20 @@ class ReplyManageBatchUpdate(APIView):
return {
"message": '更新成功',
}
class ReplyManageMove(APIView):
def post(self, request):
ids = json.loads(request.POST.get('ids', '[]'))
topic_id = request.POST.get('topic_id', None)
pictorial_id = request.POST.get('pictorial_id', None)
try:
self.rpc['venus/sun/reply/manage/batch/move'](ids=ids, topic_id=topic_id, pictorial_id=pictorial_id).unwrap()
except Exception as e:
error_logger.error(u'平移reply失败%s' % (e))
raise
return {
"message": '更新成功',
}
......@@ -150,6 +150,7 @@ urlpatterns = [
url(r'^pictorial/feed/list$', PictorialFeedlListView.as_view()),
url(r'^pictorial/feed/rank$', PictorialFeedlRank.as_view()),
url(r'^pictorial/feed/delete$', PictorialFeedDelete.as_view()),
url(r'^pictorial/topic/list$', PictorialTopicList.as_view()),
#运营位
url(r'^topic/home_recommend/list', TopicHomeRecommendList.as_view()),
......
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