Added track name to room, added day option to conference schedule view
This commit is contained in:
parent
d6ac7edc5d
commit
7ae022d2c4
3 changed files with 24 additions and 1 deletions
20
symposion/schedule/migrations/0006_room_track.py
Normal file
20
symposion/schedule/migrations/0006_room_track.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.7 on 2016-12-24 00:10
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('symposion_schedule', '0005_auto_20161210_1736'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='room',
|
||||
name='track',
|
||||
field=models.CharField(blank=True, default=None, max_length=80, null=True, verbose_name='Track'),
|
||||
),
|
||||
]
|
|
@ -51,10 +51,11 @@ class Room(models.Model):
|
|||
|
||||
schedule = models.ForeignKey(Schedule, verbose_name=_("Schedule"))
|
||||
name = models.CharField(max_length=65, verbose_name=_("Name"))
|
||||
track = models.CharField(max_length=80, verbose_name=_("Track"), default=None, blank=True, null=True)
|
||||
order = models.PositiveIntegerField(verbose_name=_("Order"))
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
return '%s (%s)' % (self.name, self.track)
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("Room")
|
||||
|
|
|
@ -52,8 +52,10 @@ def schedule_conference(request):
|
|||
"days": days,
|
||||
})
|
||||
|
||||
day_switch = request.GET.get('day', None)
|
||||
ctx = {
|
||||
"sections": sections,
|
||||
"day_switch": day_switch
|
||||
}
|
||||
return render(request, "symposion/schedule/schedule_conference.html", ctx)
|
||||
|
||||
|
|
Loading…
Reference in a new issue