Skip to content

Commit

Permalink
Use __str__ method in place of __unicode__ method
Browse files Browse the repository at this point in the history
  • Loading branch information
sks444 committed May 6, 2020
1 parent c260a61 commit 35bb9e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions junction/devices/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ class Device(TimeAuditModel):
verbose_name="Verification Code Expires At", default=expiry_time
)

def __unicode__(self):
return u"uuid: {}, is_verified: {}".format(self.uuid, self.is_verified)
def __str__(self):
return "uuid: {}, is_verified: {}".format(self.uuid, self.is_verified)
2 changes: 1 addition & 1 deletion junction/profiles/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ class Profile(AuditModel):
city = models.CharField(max_length=100, blank=True, null=True)
contact_no = models.CharField(max_length=15, blank=True, null=True)

def __unicode__(self):
def __str__(self):
return self.user.username
4 changes: 2 additions & 2 deletions junction/schedule/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ class ScheduleItem(AuditModel):

conference = models.ForeignKey(Conference, on_delete=models.CASCADE)

def __unicode__(self):
return u"{} - {} on {} from {} to {} in {}".format(
def __str__(self):
return "{} - {} on {} from {} to {} in {}".format(
self.conference,
self.name,
self.event_date,
Expand Down

0 comments on commit 35bb9e9

Please sign in to comment.