{% extends 'base.html' %} {% load staticfiles %} {# 页面标题 #} {% block title %} {{ blog.title }} {% endblock %} {% block henader-extend %} {% endblock %} {# 页面内容 #} {% block content %}

{{ blog.title }}

  • 作者:{{ blog.author }}
  • 分类: {{ blog.blog_type }}
  • 发表日期:{{ blog.created_time|date:"Y-m-d" }}
  • 阅读({{ blog.get_read_num }})
{{ blog.content|safe }}

上一篇: {% if previous_blog %} {{ previous_blog.title}} {% else %} 没有了 {% endif %}

下一篇: {% if next_blog %} {{ next_blog.title}} {% else %} 没有了 {% endif %}

提交评论

{% if user.is_authenticated %}
{% csrf_token %}
{% else %} 您尚未登录,登录之后方可评论~ 登录 or 注册 {% endif %}

评论列表

{% for comment in comments %}
{{ comment.user.username }} ({{ comment.comment_time|date:"Y-m-d H:n:s" }}): {{ comment.text }}
{% empty %} 暂无评论 {% endfor %}
{% endblock %}