Skip to content

Commit 2926b01

Browse files
committed
Use __str__ method in place of __unicode__ method
1 parent 79df273 commit 2926b01

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

junction/devices/models.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ class Device(TimeAuditModel):
2626
verbose_name="Verification Code Expires At", default=expiry_time
2727
)
2828

29-
def __unicode__(self):
30-
return u"uuid: {}, is_verified: {}".format(self.uuid, self.is_verified)
29+
def __str__(self):
30+
return "uuid: {}, is_verified: {}".format(self.uuid, self.is_verified)

junction/profiles/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ class Profile(AuditModel):
1313
city = models.CharField(max_length=100, blank=True, null=True)
1414
contact_no = models.CharField(max_length=15, blank=True, null=True)
1515

16-
def __unicode__(self):
16+
def __str__(self):
1717
return self.user.username

junction/schedule/models.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ class ScheduleItem(AuditModel):
5454

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

57-
def __unicode__(self):
58-
return u"{} - {} on {} from {} to {} in {}".format(
57+
def __str__(self):
58+
return "{} - {} on {} from {} to {} in {}".format(
5959
self.conference,
6060
self.name,
6161
self.event_date,

0 commit comments

Comments
 (0)