{% extends "user_base.html" %} {% block title %} Message|COVID-19 Detector {% endblock %} {% block specific_info %}

叫号消息

请立即前往,如果过号,将延后3号

点赞消息

用户A给你点了一个赞

用户B给你点了一个赞

私信消息

{% for messages in messagess %}
{% set send_user1=User.query.get(senders[loop.index-1][0]) %}
{% for message in messages %} {% set send_user=User.query.get(message.sender_id) %} {% if loop.first or (message.time - messages[loop.index - 2].time).total_seconds() // 60 > 5 %}
{{ message.time.strftime('%Y-%m-%d %H:%M') }}
{% endif %} {%if send_user.username==current_user.username%}

{{message.body}}

{% if send_user.has_avatar %} 头像 {% else %}
{{ send_user.username[0] }}
{% endif %}
{%else%}
{% if send_user.has_avatar %} 头像 {% else %}
{{ send_user.username[0] }}
{% endif %}

{{message.body}}

{%endif%} {% endfor %}
{% endfor %}

评论消息

{% for comment,post in comment_post_paris %} {%if comment%} {% set commender=User.query.get(comment.author_id)%}
{{ commender.username }}的评论:{{ comment.body }}
{%else%} {%if(loop.index==1)%}
{%endif%} {%endif%} {% endfor %}
{%endblock%}