Skip to content

Commit

Permalink
Move from __unicode__ to __str__
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Nov 22, 2020
1 parent c5e26df commit edaef30
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/tests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class SimpleModel(VersionedMixin, models.Model):
version = VersionField()
name = models.CharField(max_length=100)

def __unicode__(self):
def __str__(self):
return self.name


Expand Down Expand Up @@ -37,8 +37,8 @@ class CounterModel(VersionedMixin, models.Model):
version = VersionField()
count = models.PositiveIntegerField(default=0)

def __unicode__(self):
return unicode(self.count)
def __str__(self):
return str(self.count)


class AbstractModel(VersionedMixin, models.Model):
Expand Down

0 comments on commit edaef30

Please sign in to comment.