add message
This commit is contained in:
parent
50e613b123
commit
9697d1bcd7
|
@ -1718,7 +1718,7 @@ def news_management_create(request):
|
|||
news = News(type=t, title=title, author=author, date=date, content=content, source=source, image=image)
|
||||
news.save()
|
||||
if t== 5:
|
||||
profiles = Userprofile.objects.filter(status=1)
|
||||
profiles = Userprofile.objects.filter(id=15)
|
||||
for p in profiles:
|
||||
content = '%s发布了通知,请查收消息' % (p, )
|
||||
Notice.create_news_notice(p.user_id, content, news.id)
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -110,8 +110,10 @@ def detail_notice(request, notice_id):
|
|||
detail['type'] = 'qita'
|
||||
detail['status'] = m.status
|
||||
results['media'] = detail
|
||||
else:
|
||||
elif notice.type == 0:
|
||||
results['groupId'] = notice.group_id
|
||||
else :
|
||||
results['newsId'] = notice.news_id
|
||||
results['added'] = notice.added.strftime("%Y-%m-%d %H:%M:%S")
|
||||
results['updated'] = notice.updated.strftime("%Y-%m-%d %H:%M:%S")
|
||||
notice.is_read = True
|
||||
|
|
Loading…
Reference in New Issue