plenary (WIP)
This commit is contained in:
parent
d3896c2117
commit
008f9c3ff4
|
@ -54,7 +54,10 @@ class Program:
|
||||||
self.days[day]['timeslots'] = sorted(self.days[day]['timeslots'])
|
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]])
|
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)
|
self._add_talk(talk)
|
||||||
|
|
||||||
def _add_talk(self, talk):
|
def _add_talk(self, talk):
|
||||||
|
|
20
proposals/migrations/0022_talk_plenary.py
Normal file
20
proposals/migrations/0022_talk_plenary.py
Normal file
|
@ -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),
|
||||||
|
),
|
||||||
|
]
|
|
@ -119,6 +119,7 @@ class Talk(PonyConfModel):
|
||||||
start_date = models.DateTimeField(null=True, blank=True, default=None)
|
start_date = models.DateTimeField(null=True, blank=True, default=None)
|
||||||
duration = models.PositiveIntegerField(default=0, verbose_name=_('Duration (min)'))
|
duration = models.PositiveIntegerField(default=0, verbose_name=_('Duration (min)'))
|
||||||
room = models.ForeignKey(Room, blank=True, null=True, default=None)
|
room = models.ForeignKey(Room, blank=True, null=True, default=None)
|
||||||
|
plenary = models.BooleanField(default=False)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ('title',)
|
ordering = ('title',)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user