]> git.parisson.com Git - mezzo.git/commitdiff
add featured photos and metadata
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 29 Feb 2016 15:30:31 +0000 (16:30 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 29 Feb 2016 15:30:31 +0000 (16:30 +0100)
app/festival/migrations/0004_auto_20160229_1630.py [new file with mode: 0644]
app/festival/models.py

diff --git a/app/festival/migrations/0004_auto_20160229_1630.py b/app/festival/migrations/0004_auto_20160229_1630.py
new file mode 100644 (file)
index 0000000..f34db56
--- /dev/null
@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import mezzanine.core.fields
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('festival', '0003_auto_20160229_1430'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='artist',
+            name='photo_alignment',
+            field=models.CharField(default=b'left', max_length=32, verbose_name='photo alignment', choices=[(b'left', 'left'), (b'right', 'right')]),
+        ),
+        migrations.AddField(
+            model_name='artist',
+            name='photo_featured',
+            field=mezzanine.core.fields.FileField(max_length=1024, verbose_name='photo featured', blank=True),
+        ),
+        migrations.AddField(
+            model_name='artist',
+            name='photo_featured_credits',
+            field=models.CharField(max_length=255, null=True, verbose_name='photo featured credits', blank=True),
+        ),
+    ]
index c8f3a7986524c16c5543ccf5dc3ca04c49ca53c3..403f8d056e04f5791f3aa01b3791d3400c327f32 100644 (file)
@@ -14,6 +14,7 @@ from .related import SpanningForeignKey
 
 app_label = 'festival'
 
+ALIGNMENT_CHOICES = (('left', _('left')), ('right', _('right')))
 
 class MetaCore:
 
@@ -72,8 +73,11 @@ class Artist(Displayable, RichText, AdminThumbMixin):
     bio = RichTextField(_('biography'), blank=True)
     photo = FileField(_('photo'), upload_to='images/photos', max_length=1024, blank=True, format="Image")
     photo_credits = models.CharField(_('photo credits'), max_length=255, blank=True, null=True)
+    photo_alignment = models.CharField(_('photo alignment'), choices=ALIGNMENT_CHOICES, max_length=32, default="left")
     photo_description = models.TextField(_('photo description'), blank=True)
     featured = models.BooleanField(_('featured'), default=False)
+    photo_featured = FileField(_('photo featured'), upload_to='images/photos', max_length=1024, blank=True, format="Image")
+    photo_featured_credits = models.CharField(_('photo featured credits'), max_length=255, blank=True, null=True)
 
     search_fields = ("title", "bio")