Merge pull request #78 from miurahr/unicode
Return unicode from _unicode_ methods
This commit is contained in:
commit
702ddf9a2d
3 changed files with 7 additions and 7 deletions
|
@ -59,7 +59,7 @@ class Section(models.Model):
|
|||
end_date = models.DateField(_("end date"), null=True, blank=True)
|
||||
|
||||
def __unicode__(self):
|
||||
return "%s %s" % (self.conference, self.name)
|
||||
return u"%s %s" % (self.conference, self.name)
|
||||
|
||||
class Meta(object):
|
||||
verbose_name = _("section")
|
||||
|
|
|
@ -18,7 +18,7 @@ class Schedule(models.Model):
|
|||
hidden = models.BooleanField("Hide schedule from overall conference view", default=False)
|
||||
|
||||
def __unicode__(self):
|
||||
return "%s Schedule" % self.section
|
||||
return u"%s Schedule" % self.section
|
||||
|
||||
class Meta:
|
||||
ordering = ["section"]
|
||||
|
@ -30,7 +30,7 @@ class Day(models.Model):
|
|||
date = models.DateField()
|
||||
|
||||
def __unicode__(self):
|
||||
return "%s" % self.date
|
||||
return u"%s" % self.date
|
||||
|
||||
class Meta:
|
||||
unique_together = [("schedule", "date")]
|
||||
|
@ -125,7 +125,7 @@ class Slot(models.Model):
|
|||
return Room.objects.filter(pk__in=self.slotroom_set.values("room"))
|
||||
|
||||
def __unicode__(self):
|
||||
return "%s %s (%s - %s)" % (self.day, self.kind, self.start, self.end)
|
||||
return u"%s %s (%s - %s)" % (self.day, self.kind, self.start, self.end)
|
||||
|
||||
class Meta:
|
||||
ordering = ["day", "start", "end"]
|
||||
|
@ -140,7 +140,7 @@ class SlotRoom(models.Model):
|
|||
room = models.ForeignKey(Room)
|
||||
|
||||
def __unicode__(self):
|
||||
return "%s %s" % (self.room, self.slot)
|
||||
return u"%s %s" % (self.room, self.slot)
|
||||
|
||||
class Meta:
|
||||
unique_together = [("slot", "room")]
|
||||
|
@ -177,7 +177,7 @@ class Presentation(models.Model):
|
|||
yield speaker
|
||||
|
||||
def __unicode__(self):
|
||||
return "#%s %s (%s)" % (self.number, self.title, self.speaker)
|
||||
return u"#%s %s (%s)" % (self.number, self.title, self.speaker)
|
||||
|
||||
class Meta:
|
||||
ordering = ["slot"]
|
||||
|
|
|
@ -38,7 +38,7 @@ class Speaker(models.Model):
|
|||
if self.user:
|
||||
return self.name
|
||||
else:
|
||||
return "?"
|
||||
return u"?"
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse("speaker_edit")
|
||||
|
|
Loading…
Reference in a new issue