Mercurial > public > sg101
comparison 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 |
comparison
equal
deleted
inserted
replaced
196:893b6d462cf9 | 197:2baadae33f2e |
---|---|
7 <h4><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h4> | 7 <h4><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h4> |
8 {% endif %} | 8 {% endif %} |
9 <div class="news-details"> | 9 <div class="news-details"> |
10 Submitted by {{ story.submitter.username }} on {{ story.date_published|date:"F d, Y" }}. | 10 Submitted by {{ story.submitter.username }} on {{ story.date_published|date:"F d, Y" }}. |
11 </div> | 11 </div> |
12 <a href="{% url news.views.category category=story.category.id,page=1 %}"> | 12 <a href="{% url news.views.category category=story.category.id page=1 %}"> |
13 <img src="{{ story.category.icon.url }}" alt="{{ story.category.title }}" title="{{ story.category.title }}" | 13 <img src="{{ story.category.icon.url }}" alt="{{ story.category.title }}" title="{{ story.category.title }}" |
14 class="news-icon" /></a> | 14 class="news-icon" /></a> |
15 <div class="news-content"> | 15 <div class="news-content"> |
16 {{ story.short_text|safe }} | 16 {{ story.short_text|safe }} |
17 </div> | 17 </div> |
21 <a href="{{ story.get_absolute_url }}">There is more to this story, continue reading ...</a> | 21 <a href="{{ story.get_absolute_url }}">There is more to this story, continue reading ...</a> |
22 </p> | 22 </p> |
23 {% endif %} | 23 {% endif %} |
24 <hr /> | 24 <hr /> |
25 <p> | 25 <p> |
26 Category: <a href="{% url news.views.category category=story.category.id,page=1 %}">{{ story.category.title }}</a> | 26 Category: <a href="{% url news.views.category category=story.category.id page=1 %}">{{ story.category.title }}</a> |
27 <img src="{{ MEDIA_URL }}icons/comments.png" alt="Comments" title="Comments" /> | 27 <img src="{{ MEDIA_URL }}icons/comments.png" alt="Comments" title="Comments" /> |
28 <a href="{{ story.get_absolute_url }}">{{ comment_count }} comment{{ comment_count|pluralize }}</a> | 28 <a href="{{ story.get_absolute_url }}">{{ comment_count }} comment{{ comment_count|pluralize }}</a> |
29 <a href="{{ story.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png" alt="Permalink" title="Permalink" /></a> | 29 <a href="{{ story.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png" alt="Permalink" title="Permalink" /></a> |
30 {% if user.is_authenticated %} | 30 {% if user.is_authenticated %} |
31 <a href="{% url news.views.email_story story.id %}"><img src="{{ MEDIA_URL }}icons/email_go.png" | 31 <a href="{% url news.views.email_story story.id %}"><img src="{{ MEDIA_URL }}icons/email_go.png" |
32 alt="Send this story to a friend" title="Send this story to a friend" /></a> | 32 alt="Send this story to a friend" title="Send this story to a friend" /></a> |
33 {% endif %} | 33 {% endif %} |
34 </p> | 34 </p> |
35 {% if story_tags %} | 35 {% if story.tags %} |
36 <div class="news-tags"> | 36 <div class="news-tags"> |
37 <img src="{{ MEDIA_URL }}icons/tag_blue.png" alt="Tags" title="Tags" /> Tags: | 37 <img src="{{ MEDIA_URL }}icons/tag_blue.png" alt="Tags" title="Tags" /> Tags: |
38 <ul> | 38 <ul> |
39 {% for tag in story_tags %} | 39 {% for tag in story.tags %} |
40 <li><a href="{% url news-tag_page tag_name=tag.name,page=1 %}">{{ tag.name }}</a></li> | 40 <li><a href="{% url news-tag_page tag_name=tag page=1 %}">{{ tag }}</a></li> |
41 {% endfor %} | 41 {% endfor %} |
42 </ul> | 42 </ul> |
43 </div> | 43 </div> |
44 {% endif %} | 44 {% endif %} |
45 </div> | 45 </div> |