diff --git a/planning/utils.py b/planning/utils.py index d1db6e2..8591dcd 100644 --- a/planning/utils.py +++ b/planning/utils.py @@ -54,7 +54,10 @@ class Program: self.days[day]['timeslots'] = sorted(self.days[day]['timeslots']) self.days[day]['rows'] = OrderedDict([(timeslot, OrderedDict([(room, []) for room in self.rooms])) for timeslot in self.days[day]['timeslots'][:-1]]) - for talk in self.talks.all(): + for talk in self.talks.exclude(plenary=True).all(): + self._add_talk(talk) + + for talk in self.talks.filter(plenary=True).all(): self._add_talk(talk) def _add_talk(self, talk): diff --git a/proposals/migrations/0022_talk_plenary.py b/proposals/migrations/0022_talk_plenary.py new file mode 100644 index 0000000..aa69798 --- /dev/null +++ b/proposals/migrations/0022_talk_plenary.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10 on 2016-10-19 19:26 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('proposals', '0021_auto_20161016_2121'), + ] + + operations = [ + migrations.AddField( + model_name='talk', + name='plenary', + field=models.BooleanField(default=False), + ), + ] diff --git a/proposals/models.py b/proposals/models.py index 58b9b98..3030715 100644 --- a/proposals/models.py +++ b/proposals/models.py @@ -119,6 +119,7 @@ class Talk(PonyConfModel): start_date = models.DateTimeField(null=True, blank=True, default=None) duration = models.PositiveIntegerField(default=0, verbose_name=_('Duration (min)')) room = models.ForeignKey(Room, blank=True, null=True, default=None) + plenary = models.BooleanField(default=False) class Meta: ordering = ('title',)