slot name includes rooms

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
Hiroshi Miura 2015-08-01 12:42:00 +09:00
parent 91ae3de6df
commit acd5e9595a

View file

@ -125,7 +125,8 @@ class Slot(models.Model):
return Room.objects.filter(pk__in=self.slotroom_set.values("room"))
def __unicode__(self):
return u"%s %s (%s - %s)" % (self.day, self.kind, self.start, self.end)
roomlist = ' '.join(map(lambda r: r.__unicode__(), self.rooms))
return u"%s %s (%s - %s) %s" % (self.day, self.kind, self.start, self.end, roomlist)
class Meta:
ordering = ["day", "start", "end"]