Mercurial > public > sg101
diff 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 |
line wrap: on
line diff
--- a/gpp/templates/news/story_summary.html Wed Apr 07 01:59:09 2010 +0000 +++ b/gpp/templates/news/story_summary.html Sat Apr 10 04:32:24 2010 +0000 @@ -9,7 +9,7 @@ <div class="news-details"> Submitted by {{ story.submitter.username }} on {{ story.date_published|date:"F d, Y" }}. </div> -<a href="{% url news.views.category category=story.category.id,page=1 %}"> +<a href="{% url news.views.category category=story.category.id page=1 %}"> <img src="{{ story.category.icon.url }}" alt="{{ story.category.title }}" title="{{ story.category.title }}" class="news-icon" /></a> <div class="news-content"> @@ -23,7 +23,7 @@ {% endif %} <hr /> <p> -Category: <a href="{% url news.views.category category=story.category.id,page=1 %}">{{ story.category.title }}</a> +Category: <a href="{% url news.views.category category=story.category.id page=1 %}">{{ story.category.title }}</a> <img src="{{ MEDIA_URL }}icons/comments.png" alt="Comments" title="Comments" /> <a href="{{ story.get_absolute_url }}">{{ comment_count }} comment{{ comment_count|pluralize }}</a> <a href="{{ story.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png" alt="Permalink" title="Permalink" /></a> @@ -32,12 +32,12 @@ alt="Send this story to a friend" title="Send this story to a friend" /></a> {% endif %} </p> -{% if story_tags %} +{% if story.tags %} <div class="news-tags"> <img src="{{ MEDIA_URL }}icons/tag_blue.png" alt="Tags" title="Tags" /> Tags: <ul> - {% for tag in story_tags %} - <li><a href="{% url news-tag_page tag_name=tag.name,page=1 %}">{{ tag.name }}</a></li> + {% for tag in story.tags %} + <li><a href="{% url news-tag_page tag_name=tag page=1 %}">{{ tag }}</a></li> {% endfor %} </ul> </div>