Commit 077988b8 authored by 王浩's avatar 王浩

Merge branch 'haow/dev' into 'dev'

tag add collection alias

See merge request !67
parents 48d41d3b b71ab3a3
......@@ -48,8 +48,9 @@ class TagSearchView(APIView):
offset, count = get_offset_count(request)
name = request.GET.get('name')
platform = request.GET.get('platform')
collection = request.GET.get('collection')
try:
data = self.rpc['venus/sun/tag/search'](offset=offset, count=count, name=name, platform=platform).unwrap()
data = self.rpc['venus/sun/tag/search'](offset=offset, count=count, name=name, platform=platform, collection=collection).unwrap()
except Exception as e:
raise e
return {
......
......@@ -59,7 +59,9 @@ class TagUpdateOrCreateView(APIView):
'up_tags': up_tags,
'tagtypes': tagtypes,
'icon_url': request.POST.get('icon_url', '')[:-2],
'platform': request.POST.get('platform')
'platform': request.POST.get('platform'),
'collection': request.POST.get('collection'),
'alias': request.POST.get('alias')
}
try:
data = self.rpc['venus/sun/tag/edit'](id=id, data=data).unwrap()
......
......@@ -48,6 +48,9 @@ class TopicUpdateOrCreateView(APIView):
id = request.POST.get('id', '')
topic_images = list(map(lambda x: x[:-2], json.loads(request.POST.get('topic_images', []))))
tag_ids = list(map(lambda x: x.split(':')[0], json.loads(request.POST.get('tags', '[]'))))
collection_tag_ids = list(map(lambda x: x.split(':')[0], json.loads(request.POST.get('collection_tags', '[]'))))
tag_ids = tag_ids + collection_tag_ids
data = {
'topic_images': topic_images,
'video_url': request.POST.get('video_url', ''),
......
......@@ -97,6 +97,7 @@ urlpatterns = [
url(r'^tag/tagtype/create$', TagTypeUpdateOrCreateView.as_view()),
url(r'^tag/tagtype/detail$', TagTypeUpdateOrCreateView.as_view()),
# 扫脸相关
url(r'^face/star/create$', FaceStarEdit.as_view()),
url(r'^face/star/list$', StarListView.as_view()),
url(r'^face/star/list/update$', StarListView.as_view()),
......@@ -107,7 +108,6 @@ urlpatterns = [
url(r'^face/part/list/update$', FacePartListView.as_view()),
url(r'^face/part/type_list$', FacePartTypeListView.as_view()),
# 文案相关
url(r'^advertise/edit', AdvertiseCreateView.as_view()),
url(r'^advertise/list$', AdvertiseListView.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