diff gpp/templates/forums/display_post.html @ 117:a3633f39f3ce

Forums: pre-select all the user profiles when displaying a topic. As it was, the template was calling get_user_profile which was causing a db hit on every post in the topic.
author Brian Neal <bgneal@gmail.com>
date Fri, 23 Oct 2009 03:09:33 +0000
parents 0ce0104c7df3
children f8f4514b806a
line wrap: on
line diff
--- a/gpp/templates/forums/display_post.html	Fri Oct 23 03:08:40 2009 +0000
+++ b/gpp/templates/forums/display_post.html	Fri Oct 23 03:09:33 2009 +0000
@@ -6,8 +6,8 @@
       <a href="{% url bio-view_profile username=post.user.username %}" title="View Profile for {{ post.user.username }}">{{ post.user.username }}</a><br />
       <a href="{% url bio-view_profile username=post.user.username %}">{% avatar post.user %}</a>
       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 />
+      Posts: {{ post.user_profile.forum_post_count }}<br />
+      Location: {{ post.user_profile.location }}<br />
    </td>
    <td class="forum-post-body">
       <div class="forum-post-info quiet">