Fix overly verbose slot names

This commit is contained in:
Tobias 2018-12-29 14:38:16 +13:00
parent 46b5941d67
commit ac71aa170b
2 changed files with 5 additions and 5 deletions

View file

@ -21,24 +21,24 @@
<nav class="mb-4">
<div class="nav schedule-nav" id="schedule-nav" role="tablist">
Monday
Monday miniconfs
{% for section in sections %}
{% if "Miniconf" in section.schedule.section.name %}
{% for timetable in section.days %}
{% if timetable.day.date|date:"Y-m-d" == "2019-01-21" %}
{% include "symposion/schedule/_schedule_nav_link.html" with label=section.schedule.section.name %}
{% include "symposion/schedule/_schedule_nav_link.html" with label=section.schedule.section.name|cut:" Miniconf" %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
<br />
Tuesday
Tuesday miniconfs
{% for section in sections %}
{% if "Miniconf" in section.schedule.section.name %}
{% for timetable in section.days %}
{% if timetable.day.date|date:"Y-m-d" == "2019-01-22" %}
{% include "symposion/schedule/_schedule_nav_link.html" with label=section.schedule.section.name %}
{% include "symposion/schedule/_schedule_nav_link.html" with label=section.schedule.section.name|cut:" Miniconf" %}
{% endif %}
{% endfor %}
{% endif %}

View file

@ -173,7 +173,7 @@ class Slot(models.Model):
def save(self, *args, **kwargs):
roomlist = ' '.join(map(str, self.rooms))
self.name = "%s %s (%s - %s) %s" % (self.day, self.kind, self.start, self.end, roomlist)
self.name = "%s %s (%s - %s) %s" % (self.day.date, self.kind.label, self.start, self.end, roomlist)
self.content_override_html = parse(self.content_override)
super(Slot, self).save(*args, **kwargs)