comparison gpp/templates/news/category_index.html @ 310:daa2916f5b34

Fixing 145; New url tag behavior (forwards compatibility) in Django 1.3.
author Brian Neal <bgneal@gmail.com>
date Thu, 20 Jan 2011 04:03:48 +0000
parents 1246a4f1ab4f
children
comparison
equal deleted inserted replaced
309:8a0bae48b6ca 310:daa2916f5b34
1 {% extends 'news/base.html' %} 1 {% extends 'news/base.html' %}
2 {% load url from future %}
2 {% block title %}News: Categories{% endblock %} 3 {% block title %}News: Categories{% endblock %}
3 {% block categories-class %}class="active"{% endblock %} 4 {% block categories-class %}class="active"{% endblock %}
4 {% block news_content %} 5 {% block news_content %}
5 <h3>Categories</h3> 6 <h3>Categories</h3>
6 <p> 7 <p>
7 This page shows the list of news categories for the site. Under each category we show the 8 This page shows the list of news categories for the site. Under each category we show the
8 latest ten stories. To see all the stories in a category, click the icon for that category. 9 latest ten stories. To see all the stories in a category, click the icon for that category.
9 Each story is also <strong>tagged</strong> with a set of tags. You may also wish to 10 Each story is also <strong>tagged</strong> with a set of tags. You may also wish to
10 <a href="{% url news-tag_index %}">view our stories by their tags</a>. 11 <a href="{% url 'news-tag_index' %}">view our stories by their tags</a>.
11 </p> 12 </p>
12 13
13 {% for category, story_set in cat_list %} 14 {% for category, story_set in cat_list %}
14 <h3>{{ category.title }}</h3> 15 <h3>{{ category.title }}</h3>
15 <p><a href="{% url news-category slug=category.slug %}"> 16 <p><a href="{% url 'news-category' slug=category.slug %}">
16 <img src="{{ category.icon.url }}" alt="{{ category.title }}" title="{{ category.title }}" /> 17 <img src="{{ category.icon.url }}" alt="{{ category.title }}" title="{{ category.title }}" />
17 </a> 18 </a>
18 </p> 19 </p>
19 {% if story_set %} 20 {% if story_set %}
20 <ul> 21 <ul>