下面是我的代码:
{% extends "blog/base.html" %}
{% block title %}我的博客{% endblock %}
{% block content %}
我的博客
{% if tag %}
标签:"{{ tag.name }}"
<% endif %>
{% for post in posts %}
{{post.title}}
标签:
{% for tag in post.tags.all %}
{{ tag.name }}
{% if not forloop.last %},{% endif %}
{% endfor %}
作者 {{post.author}} 发布于 {{post.publish}}
{{ post.body|truncatechars:30 }}...
{% endfor %}
{% include "pagination.html" with page=posts %}
{% endblock %}