annotate gpp/templates/forums/last_post_info.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 |
rev |
line source |
bgneal@84
|
1 {% if post %}
|
bgneal@94
|
2 <a href="{{ post.get_absolute_url }}" title="Goto last post"><img src="{{ MEDIA_URL }}icons/note_go.png" alt="Goto last post" />
|
bgneal@115
|
3 <a href="{{ post.get_absolute_url }}" title="Goto last post">{{ post.creation_date|date:"M d, Y H:i"}}</a><br />
|
bgneal@84
|
4 <a href="{% url bio-view_profile username=post.user.username %}" title="View profile for {{ post.user.username }}">{{ post.user.username }}</a>
|
bgneal@84
|
5 {% else %}
|
bgneal@84
|
6 <i>No posts</i>
|
bgneal@84
|
7 {% endif %}
|