Commit 18479cbc authored by 王浩's avatar 王浩

add topic list search add drop score

parent 18622e94
......@@ -16,10 +16,17 @@ class TopicListView(APIView):
limit = int(request.GET.get('size', 10))
filters = json.loads(request.GET.get('filter', "{}"))
sorts_by = list(map(lambda i: int(i), request.GET.getlist('sort_params[]', [3])))
drop_score = request.GET.get('drop_score', None)
if user_id:
filters.update({'user_id': user_id})
if pictorial_id:
filters.update({"pictorial_id": int(pictorial_id)})
if drop_score is not None:
if int(drop_score) == 0:
filters.update({'drop_score': int(drop_score)})
elif int(drop_score) == 1:
filters.update({'drop_score__gt': int(drop_score)})
res = self.rpc['physical/search/business/topic'](
offset=(page-1) * limit,
......
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