# Generated by Django 3.1 on 2021-06-28 09:18

from django.db import migrations, models
import django.db.models.deletion
import garpix_page.utils.get_file_path
import polymorphic_tree.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('sites', '0002_alter_domain_unique'),
    ]

    operations = [
        migrations.CreateModel(
            name='BasePage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='Название')),
                ('title_ru', models.CharField(max_length=255, null=True, verbose_name='Название')),
                ('is_active', models.BooleanField(default=True, verbose_name='Включено')),
                ('display_on_sitemap', models.BooleanField(default=True, verbose_name='Отображать в карте сайта')),
                ('slug', models.SlugField(blank=True, default='', max_length=150, verbose_name='ЧПУ')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Дата создания')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Дата изменения')),
                ('seo_title', models.CharField(blank=True, default='', max_length=250, verbose_name='SEO заголовок страницы (title)')),
                ('seo_title_ru', models.CharField(blank=True, default='', max_length=250, null=True, verbose_name='SEO заголовок страницы (title)')),
                ('seo_keywords', models.CharField(blank=True, default='', max_length=250, verbose_name='SEO ключевые слова (keywords)')),
                ('seo_keywords_ru', models.CharField(blank=True, default='', max_length=250, null=True, verbose_name='SEO ключевые слова (keywords)')),
                ('seo_description', models.TextField(blank=True, default='', verbose_name='SEO описание (description)')),
                ('seo_description_ru', models.TextField(blank=True, default='', null=True, verbose_name='SEO описание (description)')),
                ('seo_author', models.CharField(blank=True, default='', max_length=250, verbose_name='SEO автор (author)')),
                ('seo_author_ru', models.CharField(blank=True, default='', max_length=250, null=True, verbose_name='SEO автор (author)')),
                ('seo_og_type', models.CharField(blank=True, default='website', max_length=250, verbose_name='SEO og:type')),
                ('seo_image', models.FileField(blank=True, null=True, upload_to=garpix_page.utils.get_file_path.get_file_path, verbose_name='SEO изображение')),
                ('lft', models.PositiveIntegerField(editable=False)),
                ('rght', models.PositiveIntegerField(editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(editable=False)),
                ('parent', polymorphic_tree.models.PolymorphicTreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='children', to='garpix_page.basepage', verbose_name='Родительская страница')),
                ('polymorphic_ctype', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_garpix_page.basepage_set+', to='contenttypes.contenttype')),
                ('sites', models.ManyToManyField(to='sites.Site', verbose_name='Сайты для отображения')),
            ],
            options={
                'verbose_name': 'Структура страниц',
                'verbose_name_plural': 'Структура страниц',
                'ordering': ('created_at', 'title'),
                'abstract': False,
                'base_manager_name': 'objects',
            },
        ),
    ]
