{% extends "base.html" %} {% block title %}{{ post.title }} · 知行博客{% endblock %} {% block content %}

{{ post.title }}

{{ post.author.username }} · {{ post.category.name }} · {{ post.created_at|date:"Y-m-d H:i" }}

{% if post.status == 'draft' %}

这是一篇草稿,只有作者可以查看。

{% endif %} {% if user.pk == post.author_id %}

编辑 · 删除

{% endif %} {% if post.cover %}{{ post.title }}的封面{% endif %}
{{ post.body|linebreaks }}

评论

{% for item in page_obj %}

{{ item.author.username }} · {{ item.created_at|date:"Y-m-d H:i" }}

{{ item.body|linebreaks }}
{% empty %}

还没有公开评论。

{% endfor %} {% include "blog/pagination.html" %} {% if post.status == 'published' %}{% if user.is_authenticated %}
{% csrf_token %}{{ comment_form.as_p }}

审核后展示;请勿提交私人信息。

{% else %}登录后评论{% endif %}{% endif %}
{% endblock %}