comparison gpp/templates/bio/members.html @ 118:a20b2c492d55

Reduced some sql queries by adding a select_related and monkey patching user profiles onto a user list in shoutbox and the bio/member's list, respectively.
author Brian Neal <bgneal@gmail.com>
date Sat, 24 Oct 2009 02:39:19 +0000
parents dbd703f7d63a
children 152d77265da6
comparison
equal deleted inserted replaced
117:a3633f39f3ce 118:a20b2c492d55
30 {% for u in page.object_list %} 30 {% for u in page.object_list %}
31 <tr class="{% cycle 'even' 'odd' %}"> 31 <tr class="{% cycle 'even' 'odd' %}">
32 <td><a href="{% url bio-view_profile username=u.username %}">{% avatar u %}</a></td> 32 <td><a href="{% url bio-view_profile username=u.username %}">{% avatar u %}</a></td>
33 <td><a href="{% url bio-view_profile username=u.username %}" title="View profile for {{ u.username }}">{{ u.username }}</a></td> 33 <td><a href="{% url bio-view_profile username=u.username %}" title="View profile for {{ u.username }}">{{ u.username }}</a></td>
34 <td>{{ u.get_full_name }}</td> 34 <td>{{ u.get_full_name }}</td>
35 <td>{{ u.get_profile.location }}</td> 35 <td>{{ u.user_profile.location }}</td>
36 <td>{{ u.date_joined|date:"M. d, Y" }}</td> 36 <td>{{ u.date_joined|date:"M. d, Y" }}</td>
37 <td> 37 <td>
38 {% ifnotequal user u %}<a href="{% url messages-compose_to u.username %}"> 38 {% ifnotequal user u %}<a href="{% url messages-compose_to u.username %}">
39 <img src="{{ MEDIA_URL }}icons/note.png" alt="PM" title="Send private message" /></a>{% endifnotequal %} 39 <img src="{{ MEDIA_URL }}icons/note.png" alt="PM" title="Send private message" /></a>{% endifnotequal %}
40 {% if not u.get_profile.hide_email %}<a href="mailto:{{ u.email }}"> 40 {% if not u.user_profile.hide_email %}<a href="mailto:{{ u.email }}">
41 <img src="{{ MEDIA_URL }}icons/email.png" alt="Email" title="Send Email" /></a>{% endif %} 41 <img src="{{ MEDIA_URL }}icons/email.png" alt="Email" title="Send Email" /></a>{% endif %}
42 </td> 42 </td>
43 </tr> 43 </tr>
44 {% endfor %} 44 {% endfor %}
45 </table> 45 </table>