# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
import gallery.models
import utils
from django.conf import settings


class Migration(migrations.Migration):

    dependencies = [
        ('events', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Photo',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=100, verbose_name='Name', blank=True)),
                ('image', models.ImageField(upload_to=gallery.models.get_upload_path, storage=utils.OverwriteStorage(), verbose_name='Bild')),
                ('anchor_horizontal', models.FloatField(blank=True, help_text=b'Der Ankerpunkt ist der interessante Teil des Bildes,        welcher nie abgeschnitten werden darf', null=True, verbose_name='horizontal Anchorpoint', choices=[(1e-08, 'Links'), (0.5, 'Mitte'), (1, 'Rechts')])),
                ('anchor_vertical', models.FloatField(blank=True, help_text=b'Wenn kein Ankerpunkt von Hand (horizontal und vertikal)        festgelegt wird, versucht die Software diesen selbst zu erraten.', null=True, verbose_name='vertical Anchorpoint', choices=[(1e-08, 'Oben'), (0.5, 'Mitte'), (1, 'Unten')])),
                ('description', models.TextField(max_length=300, verbose_name='Beschreibung', blank=True)),
                ('on_startpage', models.BooleanField(default=False, help_text='Display this Photo on the Startpage Teaser', verbose_name='Startpage')),
                ('created_date', models.DateTimeField(verbose_name='Published on')),
                ('views', models.PositiveIntegerField(default=0, verbose_name='Number of views', editable=False)),
                ('event', models.ForeignKey(to='events.Event')),
                ('photographer', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['created_date'],
                'db_table': 'events_photo',
                'verbose_name': 'Veranstaltungsbild',
                'verbose_name_plural': 'Event Images',
                'get_latest_by': 'created_date',
            },
        ),
    ]
