Source

pyweek / pyweek / challenge / templates / diary_entries.html


<div class="diary">
{% for entry in diary_entries %}
{% ifchanged %}<h2>{{ entry.created|date:"l d F, Y" }}</h2>{% endifchanged %}

<div class="diary-entry">
<h3 class="diary-title">[
  <a href="/u/{{ entry.user.username }}/">{{ entry.user.username }}</a>
 @ {{ entry.created|date:"H:i" }}
] {{ entry.title }}</h3>
<p>{% autoescape off %}{{ entry.content }}{% endautoescape %}</p>

<p class="diary-byline">
<a href="/d/{{ entry.id }}/">show
    {% if entry.diarycomment_set.count > 0 %}({{ entry.diarycomment_set.count }} comment{{ entry.diarycomment_set.count|pluralize  }}){% endif %}</a>
// ({% if is_user %}<a href="/d/{{ entry.id }}/#add-comment">add comment</a>{% else %}login to comment{% endif %})
</p>
</div>
{% endfor %}
</div>