def noti_book(request):
user = request['session'].get('user', None)
if user:
try:
motor_db = motor_base.get_db()
is_author = 0
data = await motor_db.user_message.find_one({'user': user}, {'author_latest': 1, '_id': 0})
if data:
is_author = 1
author_list = data.get('author_latest', {})
return template('noti_book.html', title='???? - owllook'.format(user=user),
is_login=1,
is_author=is_author,
author_list=author_list,
user=user)
else:
return template('noti_book.html', title='???? - owllook'.format(user=user),
is_login=1,
is_author=is_author,
user=user)
except Exception as e:
LOGGER.error(e)
return redirect('/')
else:
return redirect('/')
评论列表
文章目录