Merge pull request #110 from miurahr/slot_name_with_rooms

slot name includes rooms
This commit is contained in:
Patrick Altman 2015-08-03 07:44:57 -05:00
commit 135a79a97b

View file

@ -125,7 +125,8 @@ class Slot(models.Model):
return Room.objects.filter(pk__in=self.slotroom_set.values("room")) return Room.objects.filter(pk__in=self.slotroom_set.values("room"))
def __unicode__(self): 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: class Meta:
ordering = ["day", "start", "end"] ordering = ["day", "start", "end"]