# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-14 09:13
from __future__ import unicode_literals

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import feincms.contrib.richtext
import feincms.extensions
import feincms.module.mixins


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Page',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('active', models.BooleanField(default=True, verbose_name='active')),
                ('title', models.CharField(help_text='This title is also used for navigation menu items.', max_length=200, verbose_name='title')),
                ('slug', models.SlugField(help_text='This is used to build the URL for this page', max_length=150, verbose_name='slug')),
                ('in_navigation', models.BooleanField(default=False, verbose_name='in navigation')),
                ('override_url', models.CharField(blank=True, help_text="Override the target URL. Be sure to include slashes at the beginning and at the end if it is a local URL. This affects both the navigation and subpages' URLs.", max_length=255, verbose_name='override URL')),
                ('redirect_to', models.CharField(blank=True, help_text='Target URL for automatic redirects or the primary key of a page.', max_length=255, verbose_name='redirect to')),
                ('_cached_url', models.CharField(blank=True, db_index=True, default='', editable=False, max_length=255, verbose_name='Cached URL')),
                ('lft', models.PositiveIntegerField(db_index=True, editable=False)),
                ('rght', models.PositiveIntegerField(db_index=True, editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(db_index=True, editable=False)),
                ('_title_tag', models.CharField(blank=True, help_text='Title for browser window and search engines. Same as title by default. Recommended structure "Primary Keyword - Secondary Keyword" (max. 69). Your brand name will be added by default.', max_length=69, verbose_name='Title Tag')),
                ('meta_description', models.TextField(blank=True, help_text='Meta description for search engines (max 139).', max_length=139, validators=[django.core.validators.MaxLengthValidator(139)], verbose_name='Meta Description')),
                ('og_image', models.ImageField(blank=True, help_text='Preview image when sharing in social networks.', null=True, upload_to='og_images', verbose_name='og:image')),
                ('in_footer', models.BooleanField(default=False, help_text='This displays the page in the footer navigation.', verbose_name='In footer')),
                ('language', models.CharField(choices=[(b'de', b'German'), (b'en', b'English')], default=b'de', max_length=10, verbose_name='language')),
                ('creation_date', models.DateTimeField(editable=False, null=True, verbose_name='creation date')),
                ('modification_date', models.DateTimeField(editable=False, null=True, verbose_name='modification date')),
                ('navigation_extension', models.CharField(blank=True, help_text='Select the module providing subpages for this page if you need to customize the navigation.', max_length=200, null=True, verbose_name='navigation extension')),
                ('template_key', models.CharField(choices=[(b'content', b'Inhalt')], default=b'content', max_length=255, verbose_name='template')),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='page.Page', verbose_name='Parent')),
                ('symlinked_page', models.ForeignKey(blank=True, help_text='All content is inherited from this page if given.', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='page_page_symlinks', to='page.Page', verbose_name='symlinked page')),
                ('translation_of', models.ForeignKey(blank=True, help_text='Leave this empty for entries in the primary language.', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='page.Page', verbose_name='translation of')),
            ],
            options={
                'ordering': ['tree_id', 'lft'],
                'verbose_name': 'page',
                'verbose_name_plural': 'pages',
            },
            bases=(models.Model, feincms.extensions.ExtensionsMixin, feincms.module.mixins.ContentModelMixin),
        ),
        migrations.CreateModel(
            name='RichTextContent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', feincms.contrib.richtext.RichTextField(blank=True, verbose_name='text')),
                ('region', models.CharField(max_length=255)),
                ('ordering', models.IntegerField(default=0, verbose_name='ordering')),
                ('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='richtextcontent_set', to='page.Page')),
            ],
            options={
                'ordering': ['ordering'],
                'abstract': False,
                'verbose_name_plural': 'rich texts',
                'db_table': 'page_page_richtextcontent',
                'verbose_name': 'rich text',
                'permissions': [],
            },
        ),
    ]
