{% extends 'base.html' %} {% block content %}
{{result.headline}}
{% if is_favorited == True %} {% else %} {% endif %}
作者:{{result.user.username}}   类别:{{article_type[result.type | string]}}    日期:{{result.updatetime}}    阅读:{{result.readcount}} 次   消耗积分:{{result.credit}} 分
{# 如果消耗过积分,显示result.content全部内容 #} {# 如果没有消耗过积分,显示result_content经过过滤的内容 #} {% if payed %}
{{result.content | safe}}
{% else %}
{{result_content | safe}} {{payed}}
{% endif %} {# 这是一个注释,用于说明下面的代码块 #} {% if result.credit > 0 and not payed %}
{# 存放islogin的应该是一个布尔值,如果内容存在,返回内容,内容不存在,返回定义的False #} {% if session.get('islogin') == 'true' %} {% else %} {% endif %}
{% endif %}
版权所有,转载本站文章请注明出处:蜗牛笔记, http://www.woniunote.com/article/1
上一篇:{{result_last.headline}}
下一篇:{{result_next.headline}}
{% if session.get('islogin') == 'true' %} {% else %} {% endif %}
{% if session.get('islogin') == 'true' %} {% else %} {% endif %}
{% for article in comment %}
{% if result.userid == article.userid %} {% endif %}
{{article.content | striptags | truncate(80) }}
{% endfor %}
{% include 'side.html' %} {% endblock %} {# 定义插入内容结束 #}