From d41b8890afb195ad1accaea79fe2323d65b98c59 Mon Sep 17 00:00:00 2001 From: hernani Date: Fri, 29 Apr 2011 21:47:53 +0000 Subject: [PATCH] Some unicode fixes. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1012 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/models/base.py | 2 +- forum/models/node.py | 2 +- forum/views/readers.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/forum/models/base.py b/forum/models/base.py index 1111b43..b45d2bb 100644 --- a/forum/models/base.py +++ b/forum/models/base.py @@ -41,7 +41,7 @@ class LazyQueryList(object): def __len__(self): return len(self.items) -class ToFetch(str): +class ToFetch(unicode): pass class CachedQuerySet(models.query.QuerySet): diff --git a/forum/models/node.py b/forum/models/node.py index 33444c7..286bf4a 100644 --- a/forum/models/node.py +++ b/forum/models/node.py @@ -52,7 +52,7 @@ class NodeContent(models.Model): def tagname_list(self): if self.tagnames: - return [name.strip() for name in self.tagnames.split(u' ') if name] + return [name.strip() for name in self.tagnames.split() if name] else: return [] diff --git a/forum/views/readers.py b/forum/views/readers.py index 5989dcd..91b70bc 100644 --- a/forum/views/readers.py +++ b/forum/views/readers.py @@ -121,9 +121,9 @@ def tag(request, tag): return question_list(request, questions, - mark_safe(_('questions tagged %(tag)s') % {'tag': tag}), + mark_safe(_(u'questions tagged %(tag)s') % {'tag': tag}), None, - mark_safe(_('Questions Tagged With %(tag)s') % {'tag': tag}), + mark_safe(_(u'Questions Tagged With %(tag)s') % {'tag': tag}), False) @decorators.render('questions.html', 'questions', tabbed=False) -- 2.39.5