]> git.parisson.com Git - mezzo.git/commitdiff
optional alignment
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 29 Feb 2016 15:37:23 +0000 (16:37 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 29 Feb 2016 15:37:23 +0000 (16:37 +0100)
app/festival/migrations/0005_auto_20160229_1636.py [new file with mode: 0644]
app/festival/models.py
app/festival/templates/festival/artist_detail.html

diff --git a/app/festival/migrations/0005_auto_20160229_1636.py b/app/festival/migrations/0005_auto_20160229_1636.py
new file mode 100644 (file)
index 0000000..32426bb
--- /dev/null
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('festival', '0004_auto_20160229_1630'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='artist',
+            name='photo_alignment',
+            field=models.CharField(default=b'left', max_length=32, verbose_name='photo alignment', blank=True, choices=[(b'left', 'left'), (b'right', 'right')]),
+        ),
+    ]
index 403f8d056e04f5791f3aa01b3791d3400c327f32..fe86abbf527e7f01af68617fd0f56e7f965ab87d 100644 (file)
@@ -73,7 +73,7 @@ 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_alignment = models.CharField(_('photo alignment'), choices=ALIGNMENT_CHOICES, max_length=32, default="left", blank=True)
     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")
index ae5a2c446a1ba259c1c9bda5598b1611c67b4c09..4d4d0218f2dc682559ec51f0a405feb2cc8783d5 100644 (file)
 
 <div class="artist-bio">
  {{ artist.bio|safe }}
+ <img src="{{ MEDIA_URL }}/{{ artist.photo }}" />
 </div>
 
-<img src="{{ MEDIA_URL }}/{{ artist.photo }}" />
-
 <div class="artist-events">
     <h2>{% trans 'Events' %}</h2>
     {% for event in artist.events.all %}