# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2019-06-06 01:25
from __future__ import unicode_literals

import aldryn_apphooks_config.fields
import aldryn_categories.fields
import aldryn_translation_tools.models
import app_data.fields
import cms.models.fields
import dashboards_app.models
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import djangocms_text_ckeditor.fields
import filer.fields.image
import parler.models
import sortedm2m.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('aldryn_people', '0018_auto_20160802_1852'),
        ('aldryn_categories', '0004_auto_20150623_0859'),
        ('cms', '0020_old_tree_cleanup'),
        migrations.swappable_dependency(settings.FILER_IMAGE_MODEL),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Dashboard',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('publishing_date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='publishing date')),
                ('is_published', models.BooleanField(db_index=True, default=False, verbose_name='is published')),
                ('is_featured', models.BooleanField(db_index=True, default=False, verbose_name='is featured')),
            ],
            options={
                'ordering': ['-publishing_date'],
            },
            bases=(aldryn_translation_tools.models.TranslatedAutoSlugifyMixin, aldryn_translation_tools.models.TranslationHelperMixin, parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='Dashboards_appArchivePlugin',
            fields=[
                ('cache_duration', models.PositiveSmallIntegerField(default=0, help_text="The maximum duration (in seconds) that this plugin's content should be cached.")),
                ('cmsplugin_ptr', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='+', serialize=False, to='cms.CMSPlugin')),
            ],
            options={
                'abstract': False,
            },
            bases=(dashboards_app.models.PluginEditModeMixin, 'cms.cmsplugin', models.Model),
        ),
        migrations.CreateModel(
            name='Dashboards_appAuthorsPlugin',
            fields=[
                ('cmsplugin_ptr', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='+', serialize=False, to='cms.CMSPlugin')),
            ],
            options={
                'abstract': False,
            },
            bases=(dashboards_app.models.PluginEditModeMixin, 'cms.cmsplugin'),
        ),
        migrations.CreateModel(
            name='Dashboards_appCategoriesPlugin',
            fields=[
                ('cmsplugin_ptr', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='+', serialize=False, to='cms.CMSPlugin')),
            ],
            options={
                'abstract': False,
            },
            bases=(dashboards_app.models.PluginEditModeMixin, 'cms.cmsplugin'),
        ),
        migrations.CreateModel(
            name='Dashboards_appConfig',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(max_length=100, verbose_name='Type')),
                ('namespace', models.CharField(default=None, max_length=100, unique=True, verbose_name='Instance namespace')),
                ('app_data', app_data.fields.AppDataField(default='{}', editable=False)),
                ('permalink_type', models.CharField(choices=[('s', 'the-eagle-has-landed/'), ('ys', '1969/the-eagle-has-landed/'), ('yms', '1969/07/the-eagle-has-landed/'), ('ymds', '1969/07/16/the-eagle-has-landed/'), ('ymdi', '1969/07/16/11/')], default='slug', help_text='Choose the style of urls to use from the examples. (Note, all types are relative to apphook)', max_length=8, verbose_name='permalink type')),
                ('non_permalink_handling', models.SmallIntegerField(choices=[(200, 'Allow'), (302, 'Redirect to permalink (default)'), (301, 'Permanent redirect to permalink'), (404, 'Return 404: Not Found')], default=302, help_text='How to handle non-permalink urls?', verbose_name='non-permalink handling')),
                ('paginate_by', models.PositiveIntegerField(default=5, help_text='When paginating list views, how many dashboards per page?', verbose_name='Paginate size')),
                ('pagination_pages_start', models.PositiveIntegerField(default=10, help_text='When paginating list views, after how many pages should we start grouping the page numbers.', verbose_name='Pagination pages start')),
                ('pagination_pages_visible', models.PositiveIntegerField(default=4, help_text='When grouping page numbers, this determines how many pages are visible on each side of the active page.', verbose_name='Pagination pages visible')),
                ('exclude_featured', models.PositiveSmallIntegerField(blank=True, default=0, help_text='If you are using the Featured Dashboards plugin on the dashboard list view, you may prefer to exclude featured dashboards from the dashboard list itself to avoid duplicates. To do this, enter the same number here as in your Featured Dashboards plugin.', verbose_name='Excluded featured dashboards count')),
                ('template_prefix', models.CharField(blank=True, max_length=20, null=True, verbose_name='Prefix for template dirs')),
                ('create_authors', models.BooleanField(default=True, help_text='Automatically create authors from logged-in user?', verbose_name='Auto-create authors?')),
                ('search_indexed', models.BooleanField(default=True, help_text='Include dashboards in search indexes?', verbose_name='Include in search index?')),
                ('placeholder_base_sidebar', cms.models.fields.PlaceholderField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='dashboards_app_base_sidebar', slotname='dashboards_app_base_sidebar', to='cms.Placeholder')),
                ('placeholder_base_top', cms.models.fields.PlaceholderField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='dashboards_app_base_top', slotname='dashboards_app_base_top', to='cms.Placeholder')),
                ('placeholder_detail_bottom', cms.models.fields.PlaceholderField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='dashboards_app_detail_bottom', slotname='dashboards_app_detail_bottom', to='cms.Placeholder')),
                ('placeholder_detail_footer', cms.models.fields.PlaceholderField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='dashboards_app_detail_footer', slotname='dashboards_app_detail_footer', to='cms.Placeholder')),
                ('placeholder_detail_top', cms.models.fields.PlaceholderField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='dashboards_app_detail_top', slotname='dashboards_app_detail_top', to='cms.Placeholder')),
                ('placeholder_list_footer', cms.models.fields.PlaceholderField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='dashboards_app_list_footer', slotname='dashboards_app_list_footer', to='cms.Placeholder')),
                ('placeholder_list_top', cms.models.fields.PlaceholderField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='dashboards_app_list_top', slotname='dashboards_app_list_top', to='cms.Placeholder')),
            ],
            options={
                'verbose_name_plural': 'Sections',
                'verbose_name': 'Section',
            },
            bases=(parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='Dashboards_appConfigTranslation',
            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')),
                ('app_title', models.CharField(max_length=234, verbose_name='name')),
                ('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='dashboards_app.Dashboards_appConfig')),
            ],
            options={
                'default_permissions': (),
                'db_table': 'dashboards_app_dashboards_appconfig_translation',
                'db_tablespace': '',
                'managed': True,
                'verbose_name': 'Section Translation',
            },
        ),
        migrations.CreateModel(
            name='Dashboards_appDashboardSearchPlugin',
            fields=[
                ('cmsplugin_ptr', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='+', serialize=False, to='cms.CMSPlugin')),
                ('max_dashboards', models.PositiveIntegerField(default=10, help_text='The maximum number of found dashboards display.', validators=[django.core.validators.MinValueValidator(1)], verbose_name='max dashboards')),
                ('app_config', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dashboards_app.Dashboards_appConfig', verbose_name='Apphook configuration')),
            ],
            options={
                'abstract': False,
            },
            bases=('cms.cmsplugin',),
        ),
        migrations.CreateModel(
            name='Dashboards_appFeaturedDashboardsPlugin',
            fields=[
                ('cmsplugin_ptr', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='+', serialize=False, to='cms.CMSPlugin')),
                ('dashboard_count', models.PositiveIntegerField(default=1, help_text='The maximum number of featured dashboards display.', validators=[django.core.validators.MinValueValidator(1)])),
                ('app_config', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dashboards_app.Dashboards_appConfig', verbose_name='Apphook configuration')),
            ],
            options={
                'abstract': False,
            },
            bases=(dashboards_app.models.PluginEditModeMixin, 'cms.cmsplugin'),
        ),
        migrations.CreateModel(
            name='Dashboards_appLatestDashboardsPlugin',
            fields=[
                ('cache_duration', models.PositiveSmallIntegerField(default=0, help_text="The maximum duration (in seconds) that this plugin's content should be cached.")),
                ('cmsplugin_ptr', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='+', serialize=False, to='cms.CMSPlugin')),
                ('latest_dashboards', models.IntegerField(default=5, help_text='The maximum number of latest dashboards to display.')),
                ('exclude_featured', models.PositiveSmallIntegerField(blank=True, default=0, help_text='The maximum number of featured dashboards to exclude from display. E.g. for uses in combination with featured dashboards plugin.')),
                ('app_config', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dashboards_app.Dashboards_appConfig', verbose_name='Apphook configuration')),
            ],
            options={
                'abstract': False,
            },
            bases=(dashboards_app.models.PluginEditModeMixin, 'cms.cmsplugin', models.Model),
        ),
        migrations.CreateModel(
            name='Dashboards_appRelatedPlugin',
            fields=[
                ('cache_duration', models.PositiveSmallIntegerField(default=0, help_text="The maximum duration (in seconds) that this plugin's content should be cached.")),
                ('cmsplugin_ptr', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='+', serialize=False, to='cms.CMSPlugin')),
            ],
            options={
                'abstract': False,
            },
            bases=(dashboards_app.models.PluginEditModeMixin, 'cms.cmsplugin', models.Model),
        ),
        migrations.CreateModel(
            name='DashboardTranslation',
            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')),
                ('lead_in', djangocms_text_ckeditor.fields.HTMLField(blank=True, default='', help_text='The lead gives the reader the main idea of the story, this is useful in overviews, lists or as an introduction to your dashboard.', verbose_name='lead')),
                ('meta_title', models.CharField(blank=True, default='', max_length=255, verbose_name='meta title')),
                ('meta_description', models.TextField(blank=True, default='', verbose_name='meta description')),
                ('meta_keywords', models.TextField(blank=True, default='', verbose_name='meta keywords')),
                ('search_data', models.TextField(blank=True, editable=False)),
                ('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='dashboards_app.Dashboard')),
            ],
            options={
                'default_permissions': (),
                'db_table': 'dashboards_app_dashboard_translation',
                'db_tablespace': '',
                'managed': True,
                'verbose_name': 'dashboard Translation',
            },
        ),
        migrations.AddField(
            model_name='dashboards_appcategoriesplugin',
            name='app_config',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dashboards_app.Dashboards_appConfig', verbose_name='Apphook configuration'),
        ),
        migrations.AddField(
            model_name='dashboards_appauthorsplugin',
            name='app_config',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dashboards_app.Dashboards_appConfig', verbose_name='Apphook configuration'),
        ),
        migrations.AddField(
            model_name='dashboards_apparchiveplugin',
            name='app_config',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dashboards_app.Dashboards_appConfig', verbose_name='Apphook configuration'),
        ),
        migrations.AddField(
            model_name='dashboard',
            name='app_config',
            field=aldryn_apphooks_config.fields.AppHookConfigField(help_text='When selecting a value, the form is reloaded to get the updated default', on_delete=django.db.models.deletion.CASCADE, to='dashboards_app.Dashboards_appConfig', verbose_name='Section'),
        ),
        migrations.AddField(
            model_name='dashboard',
            name='author',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='aldryn_people.Person', verbose_name='author'),
        ),
        migrations.AddField(
            model_name='dashboard',
            name='categories',
            field=aldryn_categories.fields.CategoryManyToManyField(blank=True, to='aldryn_categories.Category', verbose_name='categories'),
        ),
        migrations.AddField(
            model_name='dashboard',
            name='content',
            field=cms.models.fields.PlaceholderField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='dashboard_content', slotname='dashboard_content', to='cms.Placeholder'),
        ),
        migrations.AddField(
            model_name='dashboard',
            name='featured_image',
            field=filer.fields.image.FilerImageField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.FILER_IMAGE_MODEL, verbose_name='featured image'),
        ),
        migrations.AddField(
            model_name='dashboard',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='owner'),
        ),
        migrations.AddField(
            model_name='dashboard',
            name='related',
            field=sortedm2m.fields.SortedManyToManyField(blank=True, help_text=None, to='dashboards_app.Dashboard', verbose_name='related dashboards'),
        ),
        migrations.AddField(
            model_name='dashboard',
            name='sidebar_content',
            field=cms.models.fields.PlaceholderField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='dashboard_sidebar_content', slotname='dashboard_sidebar_content', to='cms.Placeholder'),
        ),
        migrations.AlterUniqueTogether(
            name='dashboardtranslation',
            unique_together=set([('language_code', 'master'), ('language_code', 'slug')]),
        ),
        migrations.AlterUniqueTogether(
            name='dashboards_appconfigtranslation',
            unique_together=set([('language_code', 'master')]),
        ),
    ]
