forked from AFPy/PonyConf
event label for program
This commit is contained in:
parent
2b48783b8d
commit
e53407a6cc
|
@ -21,6 +21,7 @@ class Program:
|
|||
self.site = site
|
||||
self.conference = Conference.objects.get(site=self.site)
|
||||
self.talks = Talk.objects.\
|
||||
exclude(event__label__exact='').\
|
||||
filter(site=site, room__isnull=False, start_date__isnull=False).\
|
||||
filter(Q(duration__gt=0) | Q(event__duration__gt=0))
|
||||
|
||||
|
@ -237,8 +238,8 @@ class Program:
|
|||
'room': escape(room.name),
|
||||
'slug': escape(talk.slug),
|
||||
'title': escape(talk.title),
|
||||
'track': escape(talk.track),
|
||||
'type': escape(talk.event.name),
|
||||
'track': escape(talk.track or ''),
|
||||
'type': escape(talk.event.label),
|
||||
'abstract': escape(talk.abstract),
|
||||
'description': escape(talk.description),
|
||||
'persons': persons,
|
||||
|
|
20
proposals/migrations/0025_event_label.py
Normal file
20
proposals/migrations/0025_event_label.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10 on 2016-10-31 12:15
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('proposals', '0024_auto_20161024_1313'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='event',
|
||||
name='label',
|
||||
field=models.CharField(blank=True, default='', max_length=64, verbose_name='Label on program'),
|
||||
),
|
||||
]
|
|
@ -91,6 +91,7 @@ class Event(models.Model):
|
|||
name = models.CharField(max_length=64)
|
||||
duration = models.PositiveIntegerField(default=0, verbose_name=_('Default duration (min)'))
|
||||
color = RGBColorField(default='#ffffff', verbose_name=_("Color on program"))
|
||||
label = models.CharField(max_length=64, verbose_name=_("Label on program"), blank=True, default="")
|
||||
|
||||
class Meta:
|
||||
unique_together = ('site', 'name')
|
||||
|
|
Loading…
Reference in New Issue
Block a user