diff options
author | Jelle van der Waa <jelle@vdwaa.nl> | 2018-04-22 21:02:49 +0200 |
---|---|---|
committer | Jelle van der Waa <jelle@vdwaa.nl> | 2019-01-21 21:19:58 +0100 |
commit | 337af5719265f7b0c946b74e01d285afa12d9aec (patch) | |
tree | 59dd79d4620b4db64a6dd15ae8a0ef8733816827 /main/models.py | |
parent | 954248c1ec43b67360db26a4ee14c2f3b0178316 (diff) | |
download | archweb-337af5719265f7b0c946b74e01d285afa12d9aec.tar.gz archweb-337af5719265f7b0c946b74e01d285afa12d9aec.zip |
main: Update __unicode__ to __str__
Diffstat (limited to 'main/models.py')
-rw-r--r-- | main/models.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/main/models.py b/main/models.py index 446c33ea..18980ae5 100644 --- a/main/models.py +++ b/main/models.py @@ -33,7 +33,7 @@ class Donor(models.Model): help_text="Should we show this donor on the public page?") created = models.DateTimeField() - def __unicode__(self): + def __str__(self): return self.name class Meta: @@ -49,7 +49,7 @@ class Arch(models.Model): required_signoffs = models.PositiveIntegerField(default=2, help_text="Number of signoffs required for packages of this architecture") - def __unicode__(self): + def __str__(self): return self.name def __lt__(self, other): @@ -74,7 +74,7 @@ class Repo(models.Model): svn_root = models.CharField(max_length=64, help_text="SVN root (e.g. path) for this repository.") - def __unicode__(self): + def __str__(self): return self.name def __lt__(self, other): @@ -118,7 +118,7 @@ class Package(models.Model): get_latest_by = 'last_update' unique_together = (('pkgname', 'repo', 'arch'),) - def __unicode__(self): + def __str__(self): return self.pkgname @property @@ -435,7 +435,7 @@ class PackageFile(models.Model): directory = models.CharField(max_length=1024) filename = models.CharField(max_length=1024, null=True, blank=True) - def __unicode__(self): + def __str__(self): return "%s%s" % (self.directory, self.filename or '') class Meta: |