diff gpp/templates/news/story_summary.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 88b2b9cb8c1f
line wrap: on
line diff
--- a/gpp/templates/news/story_summary.html	Mon Jan 17 04:00:59 2011 +0000
+++ b/gpp/templates/news/story_summary.html	Thu Jan 20 04:03:48 2011 +0000
@@ -1,3 +1,4 @@
+{% load url from future %}
 {% load tagging_tags %}
 {% load comment_tags %}
 {% get_comment_count for story as comment_count %}
@@ -10,7 +11,7 @@
 <div class="news-details">
    Submitted by {{ story.submitter.username }} on {{ story.date_submitted|date:"F d, Y" }}.
 </div>
-<a href="{% url news-category slug=story.category.slug %}">
+<a href="{% url 'news-category' slug=story.category.slug %}">
 <img src="{{ story.category.icon.url }}" alt="{{ story.category.title }}" title="{{ story.category.title }}" 
    class="news-icon" /></a>
 <div class="news-content">
@@ -24,12 +25,12 @@
 {% endif %}
 <hr />
 <p>
-Category: <a href="{% url news-category slug=story.category.slug %}">{{ story.category.title }}</a>
+Category: <a href="{% url 'news-category' slug=story.category.slug %}">{{ 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>
 {% if user.is_authenticated %}
-<a href="{% url news.views.email_story story.id %}"><img src="{{ MEDIA_URL }}icons/email_go.png"
+<a href="{% url 'news.views.email_story' story.id %}"><img src="{{ MEDIA_URL }}icons/email_go.png"
    alt="Send this story to a friend" title="Send this story to a friend" /></a>
 {% endif %}
 </p>
@@ -39,7 +40,7 @@
    <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 %}">{{ tag }}</a></li>
+         <li><a href="{% url 'news-tag_page' tag_name=tag %}">{{ tag }}</a></li>
       {% endfor %}
    </ul>
 </div>