Fixed a problem on the tags page.

This commit is contained in:
Raoul Snyman 2010-01-27 10:15:39 +02:00
parent daeb272c17
commit 72c107e817
2 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ class BlogController(BaseController):
def tag(self, id=None): def tag(self, id=None):
if not id: if not id:
h.redirect_to('/') h.redirect_to('/')
c.tag = Session.query(Tag).filter_by(url=id).first() c.tag = Session.query(Tag).filter_by(url=id).all()
if not c.tag: if not c.tag:
h.redirect_to('/') h.redirect_to('/')
c.page_title = u'Blog posts with tag: %s' % c.tag.name c.page_title = u'Blog posts with tag: %s' % c.tag.name

View File

@ -5,7 +5,7 @@
<div class="post"> <div class="post">
<h3 class="title"><a href="${h.url_for_post(post)}">${post.title}</a></h3> <h3 class="title"><a href="${h.url_for_post(post)}">${post.title}</a></h3>
<div class="entry"> <div class="entry">
${h.literal(h.teaser(post.body, h.url_for_post(post)))} ${h.literal(h.teaser(post.body))}
</div> </div>
<p class="meta"> <p class="meta">
<span class="byline">Posted by ${post.user.nick} on ${post.created.strftime('%B %d, %Y')}</span> <span class="byline">Posted by ${post.user.nick} on ${post.created.strftime('%B %d, %Y')}</span>