Commits

Juan Martínez committed 2d78d5f

show the number of diary entry comments in the link

  • Participants
  • Parent commits b878d7f

Comments (0)

Files changed (1)

File pyweek/challenge/templates/diary_entries.html

 
 <p class="diary-byline">
 <a href="/d/{{ entry.id }}/">show
-{% if entry.get_diarycomment_list %}comments{% endif %}</a>
+    {% 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>