<gh_stars>0
# Generated by Django 3.2.10 on 2021-12-18 06:29

import ckeditor.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('users', '0002_profile'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, help_text='Date time on which the object was created.', verbose_name='created at')),
                ('modified', models.DateTimeField(auto_now=True, help_text='Date time on which the object was last modified.', verbose_name='modified at')),
                ('name', models.CharField(max_length=35, unique=True, verbose_name='category name')),
                ('picture', models.ImageField(upload_to='category/', verbose_name='image of category')),
            ],
            options={
                'verbose_name': 'category',
                'verbose_name_plural': 'categories',
            },
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, help_text='Date time on which the object was created.', verbose_name='created at')),
                ('modified', models.DateTimeField(auto_now=True, help_text='Date time on which the object was last modified.', verbose_name='modified at')),
                ('title', models.CharField(max_length=255)),
                ('slug_name', models.CharField(max_length=35, unique=True)),
                ('description', models.TextField(verbose_name='Description of post')),
                ('content', ckeditor.fields.RichTextField()),
                ('date', models.DateField(auto_now_add=True, help_text='Date time on which the object was created.', verbose_name='Date of posted.')),
                ('is_public', models.BooleanField(default=True, help_text='Public Posts are listed in the main page so everyone know about their existence.')),
                ('autor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.profile')),
                ('catetegory', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blogs.category')),
            ],
            options={
                'ordering': ['-created', '-modified'],
                'get_latest_by': 'created',
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Read',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, help_text='Date time on which the object was created.', verbose_name='created at')),
                ('modified', models.DateTimeField(auto_now=True, help_text='Date time on which the object was last modified.', verbose_name='modified at')),
                ('is_read_later', models.BooleanField(default=False, help_text='this field is True if a user wants to read this post later.', verbose_name='read post later')),
                ('is_finished', models.BooleanField(default=False, help_text='this field is True if a user has finished to read the post.', verbose_name='reading is finished')),
                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blogs.post')),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.profile')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created', '-modified'],
                'get_latest_by': 'created',
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='post',
            name='reads',
            field=models.ManyToManyField(through='blogs.Read', to=settings.AUTH_USER_MODEL),
        ),
    ]

# Generated by Django 3.2.10 on 2021-12-18 06:29

import ckeditor.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('users', '0002_profile'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, help_text='Date time on which the object was created.', verbose_name='created at')),
                ('modified', models.DateTimeField(auto_now=True, help_text='Date time on which the object was last modified.', verbose_name='modified at')),
                ('name', models.CharField(max_length=35, unique=True, verbose_name='category name')),
                ('picture', models.ImageField(upload_to='category/', verbose_name='image of category')),
            ],
            options={
                'verbose_name': 'category',
                'verbose_name_plural': 'categories',
            },
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, help_text='Date time on which the object was created.', verbose_name='created at')),
                ('modified', models.DateTimeField(auto_now=True, help_text='Date time on which the object was last modified.', verbose_name='modified at')),
                ('title', models.CharField(max_length=255)),
                ('slug_name', models.CharField(max_length=35, unique=True)),
                ('description', models.TextField(verbose_name='Description of post')),
                ('content', ckeditor.fields.RichTextField()),
                ('date', models.DateField(auto_now_add=True, help_text='Date time on which the object was created.', verbose_name='Date of posted.')),
                ('is_public', models.BooleanField(default=True, help_text='Public Posts are listed in the main page so everyone know about their existence.')),
                ('autor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.profile')),
                ('catetegory', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blogs.category')),
            ],
            options={
                'ordering': ['-created', '-modified'],
                'get_latest_by': 'created',
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Read',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, help_text='Date time on which the object was created.', verbose_name='created at')),
                ('modified', models.DateTimeField(auto_now=True, help_text='Date time on which the object was last modified.', verbose_name='modified at')),
                ('is_read_later', models.BooleanField(default=False, help_text='this field is True if a user wants to read this post later.', verbose_name='read post later')),
                ('is_finished', models.BooleanField(default=False, help_text='this field is True if a user has finished to read the post.', verbose_name='reading is finished')),
                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blogs.post')),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.profile')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created', '-modified'],
                'get_latest_by': 'created',
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='post',
            name='reads',
            field=models.ManyToManyField(through='blogs.Read', to=settings.AUTH_USER_MODEL),
        ),
    ]
# Generated by Django 3.2.10 on 2021-12-18 06:29