# Generated by Django 2.1.2 on 2018-11-01 07:41

import ckeditor.fields
import ckeditor_uploader.fields
import content.models
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Articles',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('article_title', models.CharField(blank=True, max_length=200, unique=True, verbose_name='Заголовок статьи')),
                ('article_link', models.SlugField(default='', max_length=150, verbose_name='Ссылка в браузере')),
                ('metakey', models.CharField(blank=True, max_length=255, verbose_name='Ключевые слова')),
                ('metadesc', models.CharField(blank=True, max_length=255, verbose_name='Мета описание')),
                ('image', models.ImageField(blank=True, upload_to=content.models.make_upload_path, verbose_name='Изображение')),
                ('article_anons', ckeditor.fields.RichTextField(blank=True, verbose_name='Анонс статьи')),
                ('article_text', ckeditor_uploader.fields.RichTextUploadingField(blank=True, verbose_name='Полный текст статьи')),
                ('article_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, verbose_name='Дата публикации')),
                ('recipe', models.BooleanField(default=False, verbose_name='Рецепт')),
                ('article_publish', models.BooleanField(default=True, verbose_name='Опубликован')),
            ],
            options={
                'verbose_name': 'Статья, рецепт',
                'verbose_name_plural': 'Статьи и рецепты',
                'db_table': 'articles',
            },
        ),
        migrations.CreateModel(
            name='Categories',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category_name', models.CharField(db_index=True, default='', max_length=200, unique=True, verbose_name='Категория')),
                ('category_link', models.SlugField(default='', max_length=150)),
                ('metakey', models.CharField(blank=True, max_length=255, verbose_name='Ключевые слова')),
                ('metadesc', models.CharField(blank=True, max_length=255, verbose_name='Мета описание')),
                ('in_header', models.SmallIntegerField(blank=True, default=0, null=True, verbose_name='Категория в шапке сайта')),
                ('class_in_header', models.CharField(blank=True, default=False, max_length=20, null=True)),
            ],
            options={
                'verbose_name': 'категория',
                'verbose_name_plural': 'категории',
                'db_table': 'categories',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Comments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user_name', models.CharField(max_length=50, verbose_name='Имя пользователя')),
                ('comment_date', models.DateField(default=django.utils.timezone.now, verbose_name='Дата')),
                ('comments_text', models.TextField(blank=True, verbose_name='Кометарий')),
                ('comments_article', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='content.Articles', verbose_name='Коментарий для статьи')),
            ],
            options={
                'verbose_name': 'коментарий',
                'verbose_name_plural': 'коментарии',
                'db_table': 'comments',
                'ordering': ['-comment_date'],
            },
        ),
        migrations.AddField(
            model_name='articles',
            name='category_article',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='content.Categories', verbose_name='Категория статьи'),
        ),
    ]
