annotate gpp/templates/news/category_index.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 dbd703f7d63a
children b4305e18d3af
rev   line source
gremmie@1 1 {% extends 'news/base.html' %}
gremmie@1 2 {% block title %}News: Categories{% endblock %}
gremmie@1 3 {% block categories-class %}class="active"{% endblock %}
gremmie@1 4 {% block news_content %}
gremmie@1 5 <h3>Categories</h3>
gremmie@1 6 <p>
gremmie@1 7 This page shows the list of news categories for the site. Under each category we show the
gremmie@1 8 latest ten stories. To see all the stories in a category, click the icon for that category.
gremmie@1 9 Each story is also <strong>tagged</strong> with a set of tags. You may also wish to
gremmie@1 10 <a href="{% url news-tag_index %}">view our stories by their tags</a>.
gremmie@1 11 </p>
gremmie@1 12
gremmie@1 13 {% for category, story_set in cat_list %}
gremmie@1 14 <h3>{{ category.title }}</h3>
bgneal@197 15 <p><a href="{% url news.views.category category=category.id page=1 %}">
gremmie@1 16 <img src="{{ category.icon.url }}" alt="{{ category.title }}" title="{{ category.title }}" />
gremmie@1 17 </a>
gremmie@1 18 </p>
gremmie@1 19 {% if story_set %}
gremmie@1 20 <ul>
gremmie@1 21 {% for story in story_set %}
gremmie@1 22 <li><a href="{{ story.get_absolute_url }}">{{ story.title }}</a>
gremmie@1 23 - {{ story.date_published|date:"F d, Y" }}</li>
gremmie@1 24 {% endfor %}
gremmie@1 25 </ul>
gremmie@1 26 {% else %}
gremmie@1 27 <p>No news at this time.</p>
gremmie@1 28 {% endif %}
gremmie@1 29 {% endfor %}
gremmie@1 30
gremmie@1 31 {% endblock %}