<p>答案是你必须把它构建成你自己的模板。这可以像下面的代码片段一样简单:</p>
<pre><code><table>
<caption>{% trans "Notices" %}</caption>
<thead>
<tr>
<th>{% trans "Type" %}</th>
<th>{% trans "Message" %}</th>
<th>{% trans "Date of the Notice" %}</th>
</tr>
</thead>
<tbody>
{% for notice in notices %}
{% if notice.is_unseen %}
<tr class="unseen_notice">
{% else %}
<tr class="notice">
{% endif %}
<td class="notice_type">[{% trans notice.notice_type.display %}]</td>
<td class="notice_message">{{ notice.message|safe }}</td>
<td class="notice_time">{{ notice.added|timesince }} {% trans "ago" %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</code></pre>
<p>作为@googletorp<a href="https://stackoverflow.com/questions/1609775/how-do-i-display-notifications-from-django-notification/1609800#1609800">answered</a>,<a href="http://pinaxproject.com" rel="nofollow noreferrer">Pinax</a>是找出作者是如何使用<code>django-notification</code>的goto位置。特别是,有一个通知管理页面,可以作为一个方便的指南。</p>