# -*- coding: utf-8 -*-
# Generated by Django 1.10.8post1 on 2018-04-25 13:34
from __future__ import unicode_literals

import cms.models.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import image_cropping.fields
import parler.models
import project.utils


class Migration(migrations.Migration):

    dependencies = [
        ('cms', '0018_pagenode'),
        ('auth', '0008_alter_user_username_max_length'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        migrations.swappable_dependency(settings.FILER_IMAGE_MODEL),
        ('portal', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Announcement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cropping', image_cropping.fields.ImageRatioField('image', '1200x800', adapt_rotation=False, allow_fullsize=False, free_crop=True, help_text=None, hide_image_field=False, size_warning=False, verbose_name='cropping')),
                ('published', models.BooleanField(default=False, verbose_name='Veröffentlicht')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='Aktualisiert')),
                ('groups', models.ManyToManyField(related_name='announcements', to='auth.Group', verbose_name='Mitglieder Gruppe')),
                ('image', project.utils.CroppableFilerImageField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Bild')),
                ('informed_users', models.ManyToManyField(blank=True, null=True, to=settings.AUTH_USER_MODEL, verbose_name='Als gelesen markiert von:')),
                ('placeholder', cms.models.fields.PlaceholderField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, slotname='content', to='cms.Placeholder')),
            ],
            options={
                'ordering': ['-updated'],
                'verbose_name': 'Neuigkeit',
                'verbose_name_plural': 'Neuigkeiten',
            },
            bases=(parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='AnnouncementTranslation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
                ('title', models.CharField(max_length=100, verbose_name='Title')),
                ('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='portal.Announcement')),
            ],
            options={
                'db_table': 'portal_announcement_translation',
                'verbose_name': 'Neuigkeit Translation',
                'db_tablespace': '',
                'default_permissions': (),
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='InformationSection',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ordering', models.IntegerField(default=50, verbose_name='Sortierung')),
            ],
            options={
                'ordering': ['ordering'],
                'verbose_name': 'Information Section',
                'verbose_name_plural': 'Information Sections',
            },
            bases=(parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='InformationSectionTranslation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
                ('title', models.CharField(max_length=100, verbose_name='Title')),
                ('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='portal.InformationSection')),
            ],
            options={
                'db_table': 'portal_informationsection_translation',
                'verbose_name': 'Information Section Translation',
                'db_tablespace': '',
                'default_permissions': (),
                'managed': True,
            },
        ),
        migrations.AlterModelOptions(
            name='information',
            options={'verbose_name': 'Information', 'verbose_name_plural': 'Informationen'},
        ),
        migrations.RemoveField(
            model_name='information',
            name='informed_users',
        ),
        migrations.RemoveField(
            model_name='information',
            name='updated',
        ),
        migrations.AddField(
            model_name='informationtranslation',
            name='description',
            field=models.TextField(default='', verbose_name='Beschreibung'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='informationtranslation',
            name='tag_list',
            field=models.TextField(blank=True, help_text='Mit Komma getrennt', null=True, verbose_name='Tags'),
        ),
        migrations.AlterField(
            model_name='information',
            name='groups',
            field=models.ManyToManyField(related_name='informations', to='auth.Group', verbose_name='Mitglieder Gruppe'),
        ),
        migrations.AddField(
            model_name='information',
            name='section',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='informations', to='portal.InformationSection', verbose_name='Information Section'),
        ),
        migrations.AlterUniqueTogether(
            name='informationsectiontranslation',
            unique_together=set([('language_code', 'master')]),
        ),
        migrations.AlterUniqueTogether(
            name='announcementtranslation',
            unique_together=set([('language_code', 'master')]),
        ),
    ]
