Mercurial > public > sg101
changeset 205:da46e77cd804
Fixing #77, news tags were getting exploded by letter on some views/template tags.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 01 May 2010 22:25:49 +0000 |
parents | b4305e18d3af |
children | 272d3a8c98e8 |
files | gpp/news/views.py gpp/templates/news/current_news.html gpp/templates/news/story.html gpp/templates/news/story_summary.html |
diffstat | 4 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/gpp/news/views.py Sat May 01 21:53:59 2010 +0000 +++ b/gpp/news/views.py Sat May 01 22:25:49 2010 +0000 @@ -30,7 +30,7 @@ from news.forms import SearchNewsForm from news.forms import SendStoryForm -NEWS_PER_PAGE = 2 +NEWS_PER_PAGE = 5 #######################################################################
--- a/gpp/templates/news/current_news.html Sat May 01 21:53:59 2010 +0000 +++ b/gpp/templates/news/current_news.html Sat May 01 22:25:49 2010 +0000 @@ -1,8 +1,6 @@ -{% load tagging_tags %} {% if stories %} <h2>Current News Stories</h2> {% for story in stories %} - {% tags_for_object story as story_tags %} {% include 'news/story_summary.html' %} {% endfor %} <hr />
--- a/gpp/templates/news/story.html Sat May 01 21:53:59 2010 +0000 +++ b/gpp/templates/news/story.html Sat May 01 22:25:49 2010 +0000 @@ -25,8 +25,6 @@ {{ story.short_text|safe }} {{ story.long_text|safe }} <br clear="all" /> - {% tags_for_object story as story_tags %} - {% if story_tags %} <hr /> <p> Category: <a href="{% url news.views.category category=story.category.id page=1 %}">{{ story.category.title }}</a> @@ -37,6 +35,8 @@ alt="Send this story to a friend" title="Send this story to a friend" /></a> {% endif %} </p> + {% tags_for_object story as story_tags %} + {% if story_tags %} <div class="news-tags"> <img src="{{ MEDIA_URL }}icons/tag_blue.png" alt="Tags" title="Tags" /> Tags: <ul>
--- a/gpp/templates/news/story_summary.html Sat May 01 21:53:59 2010 +0000 +++ b/gpp/templates/news/story_summary.html Sat May 01 22:25:49 2010 +0000 @@ -1,3 +1,4 @@ +{% load tagging_tags %} {% load comment_tags %} {% get_comment_count for story as comment_count %} <div class="news-story-container"> @@ -32,11 +33,12 @@ alt="Send this story to a friend" title="Send this story to a friend" /></a> {% endif %} </p> -{% if story.tags %} +{% tags_for_object story as story_tags %} +{% if story_tags %} <div class="news-tags"> <img src="{{ MEDIA_URL }}icons/tag_blue.png" alt="Tags" title="Tags" /> Tags: <ul> - {% for tag in story.tags %} + {% for tag in story_tags %} <li><a href="{% url news-tag_page tag_name=tag page=1 %}">{{ tag }}</a></li> {% endfor %} </ul>