--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.2 on 2016-03-23 10:59
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('festival', '0010_playlist'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='artist',
+ name='first_name',
+ field=models.CharField(blank=True, max_length=255, null=True, verbose_name='first name'),
+ ),
+ migrations.AddField(
+ model_name='artist',
+ name='last_name',
+ field=models.CharField(blank=True, max_length=255, null=True, verbose_name='last name'),
+ ),
+ ]
class Artist(Displayable, RichText, AdminThumbMixin):
"""Artist"""
+ first_name = models.CharField(_('first name'), max_length=255, blank=True, null=True)
+ last_name = models.CharField(_('last name'), max_length=255, blank=True, null=True)
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)
def get_absolute_url(self):
return reverse("festival-artist-detail", kwargs={'slug': self.slug})
+ def clean(self):
+ super(Artist, self).clean()
+ self.first_name, self.last_name = self.title.split(' ')
+
class Media(Displayable, RichText):
"""Media"""