working on speaker pictures for issue #84
This commit is contained in:
parent
e8dea3eccc
commit
c6b27de400
25
src/program/migrations/0022_auto_20170218_1148.py
Normal file
25
src/program/migrations/0022_auto_20170218_1148.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.5 on 2017-02-18 10:48
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('program', '0021_auto_20170205_2130'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='speaker',
|
||||
old_name='picture',
|
||||
new_name='picture_large',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='speaker',
|
||||
name='picture_small',
|
||||
field=models.ImageField(blank=True, null=True, upload_to=''),
|
||||
),
|
||||
]
|
|
@ -106,7 +106,8 @@ class Speaker(CreatedUpdatedModel):
|
|||
""" A Person anchoring an event. """
|
||||
name = models.CharField(max_length=150)
|
||||
biography = models.TextField()
|
||||
picture = models.ImageField(null=True, blank=True)
|
||||
picture_small = models.ImageField(null=True, blank=True)
|
||||
picture_large = models.ImageField(null=True, blank=True)
|
||||
slug = models.SlugField(blank=True, max_length=255)
|
||||
camp = models.ForeignKey('camps.Camp', null=True, related_name="speakers")
|
||||
events = models.ManyToManyField(
|
||||
|
@ -118,7 +119,7 @@ class Speaker(CreatedUpdatedModel):
|
|||
ordering = ['name']
|
||||
unique_together = (('camp', 'name'), ('camp', 'slug'))
|
||||
|
||||
def __str___(self):
|
||||
def __str__(self):
|
||||
return '%s (%s)' % (self.name, self.camp)
|
||||
|
||||
def save(self, **kwargs):
|
||||
|
|
Loading…
Reference in a new issue