Commit f4952afd authored by 王浩's avatar 王浩

Merge branch 'haow/dev' into 'dev'

create pictorial add tag info

See merge request !116
parents 48e4f926 e61f60b3
...@@ -48,6 +48,7 @@ class PictorialUpdateOrCreate(APIView): ...@@ -48,6 +48,7 @@ class PictorialUpdateOrCreate(APIView):
id = request.POST.get('id') id = request.POST.get('id')
star_ids = json.loads(request.POST.get('star', '[]')) star_ids = json.loads(request.POST.get('star', '[]'))
pictorial_user_ids = json.loads(request.POST.get('pictorial_user_ids', '[]')) pictorial_user_ids = json.loads(request.POST.get('pictorial_user_ids', '[]'))
collection_tag_ids = json.loads(request.POST.get('collection_tag_ids', '[]'))
data = { data = {
'name': request.POST.get('name', ''), 'name': request.POST.get('name', ''),
'description': request.POST.get('description', ''), 'description': request.POST.get('description', ''),
...@@ -55,8 +56,9 @@ class PictorialUpdateOrCreate(APIView): ...@@ -55,8 +56,9 @@ class PictorialUpdateOrCreate(APIView):
'celebrity_ids': star_ids, 'celebrity_ids': star_ids,
'is_online': int(request.POST.get('is_online', 0)), 'is_online': int(request.POST.get('is_online', 0)),
'is_recommend': int(request.POST.get('is_recommend', 0)), 'is_recommend': int(request.POST.get('is_recommend', 0)),
'pictorial_user_ids':pictorial_user_ids, 'pictorial_user_ids': pictorial_user_ids,
'icon': request.POST.get('icon', '') 'icon': request.POST.get('icon', ''),
'collection_tag_ids': collection_tag_ids
} }
try: try:
data = self.rpc['venus/sun/pictorial/edit'](id=id, data=data).unwrap() data = self.rpc['venus/sun/pictorial/edit'](id=id, data=data).unwrap()
......
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