# -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-08-30 15:04
from __future__ import unicode_literals

import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import froala_editor.fields
import plateform.validation


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('taggit', '0002_auto_20150616_2121'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='BlogPost',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default=None, max_length=50, unique=True, validators=[plateform.validation.is_title])),
                ('body', froala_editor.fields.FroalaField(default='', validators=[plateform.validation.is_body])),
                ('description', models.CharField(default='', max_length=200, validators=[plateform.validation.is_desc])),
                ('source', models.URLField(default='', validators=[plateform.validation.is_url])),
                ('slug', models.CharField(blank=True, default='', max_length=300, verbose_name='Slug')),
                ('date', models.DateTimeField(default=datetime.datetime.now)),
                ('keys', models.CharField(default='', max_length=300, validators=[plateform.validation.is_key])),
                ('anonymous', models.BooleanField(default=False)),
                ('post_cover_original', models.ImageField(null=True, upload_to='original_cover', validators=[plateform.validation.is_valid_image])),
                ('post_cover_thumb', models.ImageField(blank=True, null=True, upload_to='thumb_cover')),
                ('hits', models.IntegerField(default=0)),
                ('author', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('liked', models.ManyToManyField(related_name='PostLikeToggle', to=settings.AUTH_USER_MODEL)),
                ('tags', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to='taggit.Tag', validators=[plateform.validation.is_tag])),
            ],
        ),
        migrations.CreateModel(
            name='BlogPosts',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
    ]
