view gpp/templates/forums/display_post.html @ 97:96eec1ed0fd3

Render the forum page navigation in the view with render_to_string() to avoid doing it twice in the template code. Also undo a mistake in the last commit. Need 2 different orderings for Post objects: by creation date in normal views, and by reverse creation date in the admin.
author Brian Neal <bgneal@gmail.com>
date Sun, 13 Sep 2009 19:58:31 +0000
parents 93d9e74a471e
children d0d779dd0832
line wrap: on
line source
{% load avatar_tags %}
<tr class="forum-post {% cycle 'odd' 'even' %}">
   <td class="forum-post-author">
      <a name="p{{ post.id }}"></a>
      <a href="{% url bio-view_profile username=post.user.username %}">{{ post.user.username }}</a><br />
      {% avatar post.user %}
      Joined: {{ post.user.date_joined|date:"M d, Y" }}<br />
      Posts: {{ post.user.get_profile.forum_post_count }}<br />
      Location: {{ post.user.get_profile.location }}<br />
   </td>
   <td class="forum-post-body">
      <div class="forum-post-info quiet">
         <a href="{{ post.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png" alt="Link" title="Link to this post" /></a>
         Posted on {{ post.creation_date|date:"M d, Y H:i" }}
      </div>
      <div class="forum-post-body">
         {{ post.html|safe }}
      </div>
   </td>
</tr>