annotate gpp/templates/news/story_summary.html @ 197:2baadae33f2e

Got autocomplete working for the member search. Updated django and ran into a bug where url tags with comma separated kwargs starting consuming tons of CPU throughput. The work-around is to cut over to using spaces between arguments. This is now allowed to be consistent with other tags. Did some query optimization for the news app.
author Brian Neal <bgneal@gmail.com>
date Sat, 10 Apr 2010 04:32:24 +0000
parents 07da6967fc40
children b4305e18d3af
rev   line source
gremmie@1 1 {% load comment_tags %}
gremmie@1 2 {% get_comment_count for story as comment_count %}
gremmie@1 3 <div class="news-story-container">
bgneal@32 4 {% if on_home %}
bgneal@32 5 <h3><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h3>
bgneal@32 6 {% else %}
bgneal@5 7 <h4><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h4>
bgneal@32 8 {% endif %}
gremmie@1 9 <div class="news-details">
gremmie@1 10 Submitted by {{ story.submitter.username }} on {{ story.date_published|date:"F d, Y" }}.
gremmie@1 11 </div>
bgneal@197 12 <a href="{% url news.views.category category=story.category.id page=1 %}">
gremmie@1 13 <img src="{{ story.category.icon.url }}" alt="{{ story.category.title }}" title="{{ story.category.title }}"
gremmie@1 14 class="news-icon" /></a>
gremmie@1 15 <div class="news-content">
gremmie@1 16 {{ story.short_text|safe }}
gremmie@1 17 </div>
bgneal@5 18 {% if story.long_text %}
gremmie@1 19 <p>
bgneal@5 20 <img src="{{ MEDIA_URL }}icons/bullet_go.png" alt="Read More" />
bgneal@5 21 <a href="{{ story.get_absolute_url }}">There is more to this story, continue reading ...</a>
bgneal@5 22 </p>
gremmie@1 23 {% endif %}
bgneal@5 24 <hr />
bgneal@5 25 <p>
bgneal@197 26 Category: <a href="{% url news.views.category category=story.category.id page=1 %}">{{ story.category.title }}</a>
bgneal@24 27 <img src="{{ MEDIA_URL }}icons/comments.png" alt="Comments" title="Comments" />
bgneal@5 28 <a href="{{ story.get_absolute_url }}">{{ comment_count }} comment{{ comment_count|pluralize }}</a>
bgneal@5 29 <a href="{{ story.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png" alt="Permalink" title="Permalink" /></a>
bgneal@5 30 {% if user.is_authenticated %}
bgneal@5 31 <a href="{% url news.views.email_story story.id %}"><img src="{{ MEDIA_URL }}icons/email_go.png"
bgneal@5 32 alt="Send this story to a friend" title="Send this story to a friend" /></a>
bgneal@5 33 {% endif %}
gremmie@1 34 </p>
bgneal@197 35 {% if story.tags %}
gremmie@1 36 <div class="news-tags">
bgneal@24 37 <img src="{{ MEDIA_URL }}icons/tag_blue.png" alt="Tags" title="Tags" /> Tags:
gremmie@1 38 <ul>
bgneal@197 39 {% for tag in story.tags %}
bgneal@197 40 <li><a href="{% url news-tag_page tag_name=tag page=1 %}">{{ tag }}</a></li>
gremmie@1 41 {% endfor %}
gremmie@1 42 </ul>
gremmie@1 43 </div>
gremmie@1 44 {% endif %}
gremmie@1 45 </div>