From c6ee630d386235519f7bf0e92996fe94e9271d5f Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Mon, 29 Feb 2016 16:37:23 +0100 Subject: [PATCH] optional alignment --- .../migrations/0005_auto_20160229_1636.py | 19 +++++++++++++++++++ app/festival/models.py | 2 +- .../templates/festival/artist_detail.html | 3 +-- 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 app/festival/migrations/0005_auto_20160229_1636.py diff --git a/app/festival/migrations/0005_auto_20160229_1636.py b/app/festival/migrations/0005_auto_20160229_1636.py new file mode 100644 index 00000000..32426bb1 --- /dev/null +++ b/app/festival/migrations/0005_auto_20160229_1636.py @@ -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')]), + ), + ] diff --git a/app/festival/models.py b/app/festival/models.py index 403f8d05..fe86abbf 100644 --- a/app/festival/models.py +++ b/app/festival/models.py @@ -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") diff --git a/app/festival/templates/festival/artist_detail.html b/app/festival/templates/festival/artist_detail.html index ae5a2c44..4d4d0218 100644 --- a/app/festival/templates/festival/artist_detail.html +++ b/app/festival/templates/festival/artist_detail.html @@ -10,10 +10,9 @@
{{ artist.bio|safe }} +
- -

{% trans 'Events' %}

{% for event in artist.events.all %} -- 2.39.5