summaryrefslogtreecommitdiff
path: root/pgcommitfest/commitfest
diff options
context:
space:
mode:
authorMagnus Hagander2019-02-06 18:42:47 +0000
committerMagnus Hagander2019-02-06 19:01:54 +0000
commit37248717c373033626fae7396bc8ac47374abb30 (patch)
tree4362791317c42faf160ea0f6b5f51b0718abac03 /pgcommitfest/commitfest
parent12c3439a992475b2b09b57dafb1435b81709d6ee (diff)
Unicode fixes for python 3
Diffstat (limited to 'pgcommitfest/commitfest')
-rw-r--r--pgcommitfest/commitfest/feeds.py6
-rw-r--r--pgcommitfest/commitfest/lookups.py4
-rw-r--r--pgcommitfest/commitfest/models.py14
3 files changed, 12 insertions, 12 deletions
diff --git a/pgcommitfest/commitfest/feeds.py b/pgcommitfest/commitfest/feeds.py
index cd206ac..969de69 100644
--- a/pgcommitfest/commitfest/feeds.py
+++ b/pgcommitfest/commitfest/feeds.py
@@ -21,13 +21,13 @@ class ActivityFeed(Feed):
if self.cfid:
return item['name']
else:
- return u'{cfname}: {name}'.format(**item)
+ return '{cfname}: {name}'.format(**item)
def item_description(self, item):
if self.cfid:
- return u"<div>Patch: {name}</div><div>User: {by}</div>\n<div>{what}</div>".format(**item)
+ return "<div>Patch: {name}</div><div>User: {by}</div>\n<div>{what}</div>".format(**item)
else:
- return u"<div>Commitfest: {cfname}</div><div>Patch: {name}</div><div>User: {by}</div><div>{what}</div>".format(**item)
+ return "<div>Commitfest: {cfname}</div><div>Patch: {name}</div><div>User: {by}</div><div>{what}</div>".format(**item)
def item_link(self, item):
if self.cfid:
diff --git a/pgcommitfest/commitfest/lookups.py b/pgcommitfest/commitfest/lookups.py
index 7297ccc..33e2b4e 100644
--- a/pgcommitfest/commitfest/lookups.py
+++ b/pgcommitfest/commitfest/lookups.py
@@ -16,11 +16,11 @@ class UserLookup(ModelLookup):
def get_item_value(self, item):
# Display for currently selected item
- return u"%s (%s)" % (item.username, item.get_full_name())
+ return "%s (%s)" % (item.username, item.get_full_name())
def get_item_label(self, item):
# Display for choice listings
- return u"%s (%s)" % (item.username, item.get_full_name())
+ return "%s (%s)" % (item.username, item.get_full_name())
registry.register(UserLookup)
diff --git a/pgcommitfest/commitfest/models.py b/pgcommitfest/commitfest/models.py
index 5a8de34..b59d754 100644
--- a/pgcommitfest/commitfest/models.py
+++ b/pgcommitfest/commitfest/models.py
@@ -15,8 +15,8 @@ class Committer(models.Model):
user = models.OneToOneField(User, null=False, blank=False, primary_key=True)
active = models.BooleanField(null=False, blank=False, default=True)
- def __unicode__(self):
- return unicode(self.user)
+ def __str__(self):
+ return str(self.user)
@property
def fullname(self):
@@ -60,7 +60,7 @@ class CommitFest(models.Model):
def isopen(self):
return self.status == self.STATUS_OPEN
- def __unicode__(self):
+ def __str__(self):
return self.name
class Meta:
@@ -71,7 +71,7 @@ class CommitFest(models.Model):
class Topic(models.Model):
topic = models.CharField(max_length=100, blank=False, null=False)
- def __unicode__(self):
+ def __str__(self):
return self.topic
@@ -142,7 +142,7 @@ class Patch(models.Model, DiffableModel):
else:
self.lastmail = max(threads, key=lambda t: t.latestmessage).latestmessage
- def __unicode__(self):
+ def __str__(self):
return self.name
class Meta:
@@ -215,7 +215,7 @@ class PatchHistory(models.Model):
def by_string(self):
return "%s %s (%s)" % (self.by.first_name, self.by.last_name, self.by.username)
- def __unicode__(self):
+ def __str__(self):
return "%s - %s" % (self.patch.name, self.date)
class Meta:
@@ -277,7 +277,7 @@ class MailThread(models.Model):
latestsubject = models.CharField(max_length=500, null=False, blank=False)
latestmsgid = models.CharField(max_length=1000, null=False, blank=False)
- def __unicode__(self):
+ def __str__(self):
return self.subject
class Meta: