fix encoding bug
This commit is contained in:
parent
6433c3cdd7
commit
8ae4ede5cc
Binary file not shown.
|
@ -46,7 +46,7 @@ def create_task(request):
|
|||
if not content:
|
||||
return JsonResponse({'status': 'error', 'message': 'URL地址不能为空'})
|
||||
groups = request.POST.getlist('groups', [])
|
||||
print(groups)
|
||||
# print(groups)
|
||||
task = Task.objects.create(created_by=user, content=content)
|
||||
task.add_groups(groups)
|
||||
task.add_task_message(user.id)
|
||||
|
@ -57,7 +57,7 @@ def create_task(request):
|
|||
urlAddtion = TaskAddition.objects.create(
|
||||
task=task, category=0, url=url)
|
||||
og_title, og_description, og_url, og_image = parse(url)
|
||||
print(og_title, og_description, og_url, og_image)
|
||||
# print(user.id, og_title, og_description, og_url, og_image)
|
||||
task.add_url_message(
|
||||
user.id, og_title, og_description, og_url, og_image)
|
||||
if file:
|
||||
|
@ -75,6 +75,7 @@ def create_task(request):
|
|||
g = Group.objects.get(id=group)
|
||||
content = '%s在群组“%s”发布了任务,请查收消息' % (creater_profile, g.name)
|
||||
Notice.create_normal_notice(u.user_id, content, group)
|
||||
# print(u.user.username)
|
||||
phones.append(u.user.username)
|
||||
send_tnps(phones, '任务', content)
|
||||
return JsonResponse({'status': 'success'})
|
||||
|
|
Loading…
Reference in New Issue