]> git.openstreetmap.org Git - osqa.git/commitdiff
Some unicode fixes.
authorhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Fri, 29 Apr 2011 21:47:53 +0000 (21:47 +0000)
committerhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Fri, 29 Apr 2011 21:47:53 +0000 (21:47 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1012 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/models/base.py
forum/models/node.py
forum/views/readers.py

index 1111b43e8b9beac21c3c19fe61a5aa60671462e7..b45d2bb23c03b2bf936f29a3a3f80802dd598d0c 100644 (file)
@@ -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):
index 33444c7d678a5cc58d3b653ee2aac2ef7d77246c..286bf4afc564eccf39eedd662fb1dfc89db3472c 100644 (file)
@@ -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 []
 
index 5989dcddbcbd1dde5eaa94d4eddb1d93d4788a16..91b70bcb68ba70f5f332db55e74612d459ce3f26 100644 (file)
@@ -121,9 +121,9 @@ def tag(request, tag):
 
     return question_list(request,
                          questions,
-                         mark_safe(_('questions tagged <span class="tag">%(tag)s</span>') % {'tag': tag}),
+                         mark_safe(_(u'questions tagged <span class="tag">%(tag)s</span>') % {'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)