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

import django.db.models.deletion
from django.conf import settings
from django.db import models, migrations


class Migration(migrations.Migration):
    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(
                    verbose_name='ID',
                    serialize=False, auto_created=True,
                    primary_key=True)),
                ('headline_de', models.CharField(
                    max_length=255, verbose_name='Schlagzeile')),
                ('headline_en', models.CharField(
                    max_length=255, verbose_name=b'Headline', blank=True)),
                ('content_de', models.TextField(verbose_name='Inhalt')),
                ('content_en', models.TextField(
                    verbose_name=b'Content', blank=True)),
                ('image', models.ImageField(
                    upload_to=b'news/',
                    null=True, verbose_name='Bild',
                    blank=True)),
                ('slug', models.SlugField(
                    unique_for_month=b'date_created', verbose_name='Slug')),
                ('status',
                 models.SmallIntegerField(
                     default=1, verbose_name='Status',
                     choices=[
                         (-1, 'Zur\xfcckgewiesen'),
                         (0, 'Wartend...'),
                         (1, 'Ver\xf6ffentlicht')])),
                ('date_created', models.DateTimeField(
                    verbose_name='Erstellt', blank=True)),
                ('date_modified', models.DateTimeField(
                    auto_now=True, verbose_name='Bearbeitet')),
                ('author', models.ForeignKey(
                    verbose_name='Autor', to=settings.AUTH_USER_MODEL,
                    on_delete=models.CASCADE))
            ],
            options={
                'ordering': ('-date_created',),
                'verbose_name': 'Artikel',
                'verbose_name_plural': 'Artikel',
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(
                    verbose_name='ID',
                    serialize=False, auto_created=True,
                    primary_key=True)),
                ('name_de',
                 models.CharField(max_length=80, verbose_name='Name')),
                ('name_en', models.CharField(
                    max_length=80, verbose_name='Name', blank=True)),
                ('description_de',
                 models.TextField(verbose_name='Beschreibung')),
                ('description_en', models.TextField(
                    verbose_name='Beschreibung', blank=True)),
                ('image', models.ImageField(
                    upload_to=b'news/categories/',
                    null=True, verbose_name='Bild',
                    blank=True)),
                ('slug', models.SlugField(unique=True, verbose_name='Slug')),
            ],
            options={
                'ordering': ('slug',),
                'verbose_name': 'Kategorie',
                'verbose_name_plural': 'Kategorien',
            },
        ),
        migrations.CreateModel(
            name='Page',
            fields=[
                ('id', models.AutoField(
                    verbose_name='ID',
                    serialize=False, auto_created=True,
                    primary_key=True)),
                ('menu_name_de', models.CharField(
                    help_text='Ein kurzer Name f\xfcr den Men\xfceintrag',
                    max_length=255, verbose_name=b'Men\xc3\xbc Name')),
                ('menu_name_en', models.CharField(
                    help_text='Ein kurzer Name f\xfcr den Men\xfceintrag',
                    max_length=255, verbose_name=b'Menu Name', blank=True)),
                ('title_de', models.CharField(
                    help_text='Der Titel erscheint im HTML Header',
                    max_length=255, verbose_name=b'Titel')),
                ('title_en', models.CharField(
                    help_text='Der Titel erscheint im HTML Header',
                    max_length=255, verbose_name=b'Title', blank=True)),
                ('slug', models.SlugField(verbose_name='Slug')),
                ('path', models.CharField(
                    verbose_name='Pfad', unique=True,
                    max_length=100, editable=False,
                    db_index=True)),
                ('position', models.PositiveSmallIntegerField(
                    null=True, verbose_name='Position', blank=True)),
                ('status',
                 models.SmallIntegerField(
                     default=0, verbose_name='Status',
                     choices=[
                         (-1, 'Zur\xfcckgewiesen'),
                         (0, 'Wartend...'),
                         (1, 'Ver\xf6ffentlicht')])),
                ('content_type', models.IntegerField(choices=[
                    (0, 'Django View'), (1, 'HTML'), (2, 'PDF')])),
                ('content_de',
                 models.TextField(verbose_name=b'Inhalt', blank=True)),
                ('content_en', models.TextField(
                    verbose_name=b'Content', blank=True)),
                ('enable_comments', models.BooleanField(
                    default=True, verbose_name='Kommentare m\xf6glich')),
                ('template', models.CharField(
                    default=b'content/page.html',
                    max_length=100,
                    verbose_name='Vorlage')),
                ('pdf_de', models.FileField(
                    null=True, upload_to=b'pdf/de/', blank=True)),
                ('pdf_en', models.FileField(
                    null=True, upload_to=b'pdf/en/', blank=True)),
                ('parent', models.ForeignKey(
                    related_name='subpages',
                    on_delete=django.db.models.deletion.SET_NULL,
                    blank=True, to='content.Page',
                    null=True)),
            ],
            options={
                'ordering': ['parent__id', 'position'],
                'verbose_name': 'Seite',
                'verbose_name_plural': 'Seiten',
            },
        ),
        migrations.AddField(
            model_name='article',
            name='category',
            field=models.ForeignKey(
                verbose_name='Kategorie', to='content.Category',
                on_delete=models.CASCADE),
        ),
        migrations.AlterUniqueTogether(
            name='page',
            unique_together={('slug', 'parent')},
        ),
    ]
