# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-19 16:14
from __future__ import unicode_literals

import aldryn_translation_tools.models
import cms.models.fields
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import django_cms_tools.permissions
import django_tools.permissions
import parler.models


class Migration(migrations.Migration):

    replaces = [('plugin_landing_page', '0001_initial'), ('plugin_landing_page', '0002_auto_20180219_1534'), ('plugin_landing_page', '0003_auto_20180219_1611')]

    initial = True

    dependencies = [
        ('cms', '0016_auto_20160608_1535'),
    ]

    operations = [
        migrations.CreateModel(
            name='LandingPageModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('publisher_is_draft', models.BooleanField(db_index=True, default=True, editable=False)),
                ('publisher_modified_at', models.DateTimeField(default=django.utils.timezone.now, editable=False)),
                ('publisher_published_at', models.DateTimeField(editable=False, null=True)),
                ('publication_start_date', models.DateTimeField(blank=True, db_index=True, help_text='Published content will only be visible from this point in time. Leave blank if always visible.', null=True, verbose_name='publication start date')),
                ('publication_end_date', models.DateTimeField(blank=True, db_index=True, help_text='When to expire the published version. Leave empty to never expire.', null=True, verbose_name='publication end date')),
                ('createtime', models.DateTimeField(default=django.utils.timezone.now, editable=False, help_text='Create time')),
                ('lastupdatetime', models.DateTimeField(default=django.utils.timezone.now, editable=False, help_text='Time of the last change.')),
                ('robots_index', models.BooleanField(default=True, help_text="If checked: meta robots 'index' is set, otherwise 'noindex'.", verbose_name='Robots-Index')),
                ('robots_follow', models.BooleanField(default=True, help_text="If checked: meta robots 'follow' is set, otherwise 'nofollow'.", verbose_name='Robots-Follow')),
                ('content', cms.models.fields.PlaceholderField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, slotname='landing-page-content', to='cms.Placeholder')),
                ('publisher_linked', models.OneToOneField(editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='publisher_draft', to='plugin_landing_page.LandingPageModel')),
            ],
            options={
                'verbose_name': 'LandingPage',
                'verbose_name_plural': 'LandingPages',
                'ordering': ('-createtime',),
            },
            bases=(django_cms_tools.permissions.EditModeAndChangePermissionMixin, aldryn_translation_tools.models.TranslatedAutoSlugifyMixin, parler.models.TranslatableModelMixin, django_tools.permissions.ModelPermissionMixin, models.Model),
        ),
        migrations.CreateModel(
            name='LandingPageModelTranslation',
            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=234, verbose_name='Title')),
                ('slug', models.SlugField(blank=True, help_text='Used in the URL. If changed, the URL will change. Clear it to have it re-created automatically.', max_length=255, verbose_name='Slug')),
                ('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='plugin_landing_page.LandingPageModel')),
            ],
            options={
                'verbose_name': 'LandingPage Translation',
                'db_table': 'plugin_landing_page_landingpagemodel_translation',
                'db_tablespace': '',
                'managed': True,
                'default_permissions': (),
            },
        ),
        migrations.AlterUniqueTogether(
            name='landingpagemodeltranslation',
            unique_together=set([('language_code', 'master')]),
        ),
        migrations.AlterModelOptions(
            name='landingpagemodel',
            options={'default_permissions': ('add', 'change', 'delete', 'can_publish'), 'ordering': ('-createtime',), 'verbose_name': 'Landing Page', 'verbose_name_plural': 'Landing Pages'},
        ),
        migrations.AlterModelOptions(
            name='landingpagemodeltranslation',
            options={'default_permissions': (), 'managed': True, 'verbose_name': 'Landing Page Translation'},
        ),
    ]
