aboutsummaryrefslogtreecommitdiffstats
path: root/rrs/models.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2018-02-28 11:40:06 +1300
committerPaul Eggleton <paul.eggleton@linux.intel.com>2018-05-04 23:57:52 +1200
commitedb1261d2bcc23d34bc074e7fdf4e1efe63230de (patch)
tree8ce535e05947dfc1fa0b15d0c643eaf0cdfee5cb /rrs/models.py
parent252578e26d5d3d24de45bf4af7e04ecb5ff2cda6 (diff)
downloadopenembedded-core-contrib-edb1261d2bcc23d34bc074e7fdf4e1efe63230de.tar.gz
rrs: fix model string representations for Python 3
__unicode__ doesn't work anymore, we need to use __str__ for models instead. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'rrs/models.py')
-rw-r--r--rrs/models.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/rrs/models.py b/rrs/models.py
index 2a10f253a18..61740bf9de6 100644
--- a/rrs/models.py
+++ b/rrs/models.py
@@ -53,7 +53,7 @@ class Release(models.Model):
return current_release or Release.objects.filter().order_by('-end_date')[0]
- def __unicode__(self):
+ def __str__(self):
return '%s' % (self.name)
class Milestone(models.Model):
@@ -152,7 +152,7 @@ class Milestone(models.Model):
return weeks
- def __unicode__(self):
+ def __str__(self):
return '%s%s' % (self.release.name, self.name)
class Maintainer(models.Model):
@@ -180,7 +180,7 @@ class Maintainer(models.Model):
class Meta:
ordering = ["name"]
- def __unicode__(self):
+ def __str__(self):
return "%s <%s>" % (self.name, self.email)
class RecipeMaintainerHistory(models.Model):
@@ -213,7 +213,7 @@ class RecipeMaintainerHistory(models.Model):
else:
return None
- def __unicode__(self):
+ def __str__(self):
return "%s: %s, %s" % (self.date, self.author.name, self.sha1[:10])
class RecipeMaintainer(models.Model):
@@ -231,7 +231,7 @@ class RecipeMaintainer(models.Model):
else:
return None
- def __unicode__(self):
+ def __str__(self):
return "%s: %s <%s>" % (self.recipe.pn, self.maintainer.name,
self.maintainer.email)
@@ -268,7 +268,7 @@ class RecipeUpstreamHistory(models.Model):
else:
return None
- def __unicode__(self):
+ def __str__(self):
return '%s: %s' % (self.id, self.start_date)
class RecipeUpstream(models.Model):
@@ -336,7 +336,7 @@ class RecipeUpstream(models.Model):
else:
return False
- def __unicode__(self):
+ def __str__(self):
return '%s: (%s, %s, %s)' % (self.recipe.pn, self.status,
self.version, self.date)
@@ -345,7 +345,7 @@ class RecipeDistro(models.Model):
distro = models.CharField(max_length=100, blank=True)
alias = models.CharField(max_length=100, blank=True)
- def __unicode__(self):
+ def __str__(self):
return '%s: %s' % (self.recipe.pn, self.distro)
@staticmethod
@@ -381,7 +381,7 @@ class RecipeUpgrade(models.Model):
web_interface_url = self.recipe.layerbranch.layer.vcs_web_url
return web_interface_url + "/commit/?id=" + self.sha1
- def __unicode__(self):
+ def __str__(self):
return '%s: (%s, %s)' % (self.recipe.pn, self.version,
self.commit_date)