Mercurial > public > sg101
comparison gpp/templates/news/story.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 | 2d299909e074 |
children | b4305e18d3af |
comparison
equal
deleted
inserted
replaced
196:893b6d462cf9 | 197:2baadae33f2e |
---|---|
17 <div class="news-details"> | 17 <div class="news-details"> |
18 Submitted by {{ story.submitter.username }} on {{ story.date_published|date:"F d, Y" }}. | 18 Submitted by {{ story.submitter.username }} on {{ story.date_published|date:"F d, Y" }}. |
19 </div> | 19 </div> |
20 <hr /> | 20 <hr /> |
21 <div class="news-content"> | 21 <div class="news-content"> |
22 <a href="{% url news.views.category category=story.category.id,page=1 %}"> | 22 <a href="{% url news.views.category category=story.category.id page=1 %}"> |
23 <img src="{{ story.category.icon.url }}" alt="{{ story.category.title }}" title="{{ story.category.title }}" | 23 <img src="{{ story.category.icon.url }}" alt="{{ story.category.title }}" title="{{ story.category.title }}" |
24 class="news-icon" /></a> | 24 class="news-icon" /></a> |
25 {{ story.short_text|safe }} | 25 {{ story.short_text|safe }} |
26 {{ story.long_text|safe }} | 26 {{ story.long_text|safe }} |
27 <br clear="all" /> | 27 <br clear="all" /> |
28 {% tags_for_object story as story_tags %} | 28 {% tags_for_object story as story_tags %} |
29 {% if story_tags %} | 29 {% if story_tags %} |
30 <hr /> | 30 <hr /> |
31 <p> | 31 <p> |
32 Category: <a href="{% url news.views.category category=story.category.id,page=1 %}">{{ story.category.title }}</a> | 32 Category: <a href="{% url news.views.category category=story.category.id page=1 %}">{{ story.category.title }}</a> |
33 <a href="{{ story.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png" | 33 <a href="{{ story.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png" |
34 alt="Story Permalink" title="Story Permalink" /></a> | 34 alt="Story Permalink" title="Story Permalink" /></a> |
35 {% if user.is_authenticated %} | 35 {% if user.is_authenticated %} |
36 <a href="{% url news.views.email_story story.id %}"><img src="{{ MEDIA_URL }}icons/email_go.png" | 36 <a href="{% url news.views.email_story story.id %}"><img src="{{ MEDIA_URL }}icons/email_go.png" |
37 alt="Send this story to a friend" title="Send this story to a friend" /></a> | 37 alt="Send this story to a friend" title="Send this story to a friend" /></a> |
39 </p> | 39 </p> |
40 <div class="news-tags"> | 40 <div class="news-tags"> |
41 <img src="{{ MEDIA_URL }}icons/tag_blue.png" alt="Tags" title="Tags" /> Tags: | 41 <img src="{{ MEDIA_URL }}icons/tag_blue.png" alt="Tags" title="Tags" /> Tags: |
42 <ul> | 42 <ul> |
43 {% for tag in story_tags %} | 43 {% for tag in story_tags %} |
44 <li><a href="{% url news-tag_page tag_name=tag.name,page=1 %}">{{ tag.name }}</a></li> | 44 <li><a href="{% url news-tag_page tag_name=tag.name page=1 %}">{{ tag.name }}</a></li> |
45 {% endfor %} | 45 {% endfor %} |
46 </ul> | 46 </ul> |
47 </div> | 47 </div> |
48 {% endif %} | 48 {% endif %} |
49 </div> | 49 </div> |