Esempio n. 1
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('blog', '0003_auto_20190905_1104'),
    ]

    operations = [
        migrations.CreateModel(
            name='Use',
            fields=[
                ('id_student', models.AutoField(primary_key=True, serialize=False)),
                ('surname', models.CharField(max_length=30)),
                ('name', models.CharField(max_length=30)),
                ('patronymic', models.CharField(max_length=30)),
                ('gender', models.CharField(choices=[('мужчина', 'мужчина'), ('женщина', 'женщина')], max_length=8)),
                ('grade_point_average', models.FloatField(default=None)),
                ('birthday', models.DateField()),
                ('marital_status', models.CharField(choices=[('не женат', 'не женат'), ('не замужем', 'не замужем'), ('женат', 'женат'), ('замужем', 'замужем')], max_length=11)),
                ('address', models.CharField(max_length=300)),
                ('phone', models.CharField(max_length=10, unique=True)),
                ('email', models.CharField(max_length=100)),
                ('school', models.CharField(max_length=200)),
                ('avatar', models.ImageField(upload_to=blog.models.generate_file_name)),
                ('account', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.DeleteModel(
            name='Comment',
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('blog', '0002_blog_score'),
    ]

    operations = [
        migrations.AlterField(
            model_name='blog',
            name='score',
            field=models.FloatField(
                validators=[blog.models.check_if_valid_score]),
        ),
    ]
Esempio n. 3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Blog',
            fields=[
                ('id',
                 models.CharField(default=blog.models.next_id,
                                  max_length=50,
                                  primary_key=True,
                                  serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('summary', models.CharField(max_length=200)),
                ('content', models.TextField()),
                ('created_at', models.FloatField(default=time.time)),
            ],
        ),
    ]
Esempio n. 4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Catalog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(db_index=True, max_length=150)),
                ('slug', models.SlugField(unique=True)),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
            ],
        ),
        migrations.CreateModel(
            name='Category_a_laptop',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('slug', models.SlugField(unique=True)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='a_laptop_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
            ],
        ),
        migrations.CreateModel(
            name='Category_Phone',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('slug', models.SlugField(unique=True)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='phone_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
            ],
        ),
        migrations.CreateModel(
            name='Category_TV',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('slug', models.SlugField(unique=True)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='tv_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('price', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='Xiaomi',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('onnect', models.CharField(db_index=True, max_length=30)),
                ('memory', models.CharField(db_index=True, max_length=30)),
                ('camera', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='xiaomi_phone_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_phone',
                 models.ManyToManyField(blank=True,
                                        related_name='xiaomi_phone',
                                        to='blog.Category_Phone')),
                ('xiaomi_phone',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_Phone')),
            ],
        ),
        migrations.CreateModel(
            name='Sony',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('screen', models.CharField(db_index=True, max_length=30)),
                ('connect', models.CharField(db_index=True, max_length=30)),
                ('size', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='sony_tv_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_tv',
                 models.ManyToManyField(blank=True,
                                        related_name='sony_tv',
                                        to='blog.Category_TV')),
                ('sonys_tv',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_TV')),
            ],
        ),
        migrations.CreateModel(
            name='Samsung_TV',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('screen', models.CharField(db_index=True, max_length=30)),
                ('connect', models.CharField(db_index=True, max_length=30)),
                ('size', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='samsung_tv_tv_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_tv',
                 models.ManyToManyField(blank=True,
                                        related_name='samsung_tv_tv',
                                        to='blog.Category_TV')),
                ('samsungs_tv',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_TV')),
            ],
        ),
        migrations.CreateModel(
            name='Samsung',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('camera', models.CharField(db_index=True, max_length=30)),
                ('memory', models.CharField(db_index=True, max_length=30)),
                ('connect', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='samsung_phone_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_phone',
                 models.ManyToManyField(blank=True,
                                        related_name='samsung_phone',
                                        to='blog.Category_Phone')),
                ('samsung_phone',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_Phone')),
            ],
        ),
        migrations.CreateModel(
            name='Panasonic',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('screen', models.CharField(db_index=True, max_length=30)),
                ('connect', models.CharField(db_index=True, max_length=30)),
                ('size', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='panasonic_tv_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_tv',
                 models.ManyToManyField(blank=True,
                                        related_name='panasonic_tv',
                                        to='blog.Category_TV')),
                ('panasonic_tv',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_TV')),
            ],
        ),
        migrations.CreateModel(
            name='OrderItem',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('item',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Item')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('start_date', models.DateTimeField(auto_now_add=True)),
                ('ordered_date', models.DateTimeField()),
                ('ordered', models.BooleanField(default=False)),
                ('items', models.ManyToManyField(to='blog.OrderItem')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Mac_OS',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('touch',
                 models.CharField(blank=True, db_index=True, max_length=30)),
                ('weight', models.CharField(db_index=True, max_length=30)),
                ('memory', models.CharField(db_index=True, max_length=30)),
                ('onnect', models.CharField(db_index=True, max_length=30)),
                ('thickness', models.CharField(db_index=True, max_length=30)),
                ('ssd', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='mac_os_a_laptop_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_a_laptop',
                 models.ManyToManyField(blank=True,
                                        related_name='mac_os_a_laptop',
                                        to='blog.Category_a_laptop')),
                ('mac_a_laptop',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_a_laptop')),
            ],
        ),
        migrations.CreateModel(
            name='LG',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('screen', models.CharField(db_index=True, max_length=30)),
                ('connect', models.CharField(db_index=True, max_length=30)),
                ('size', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='lg_tv_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_tv',
                 models.ManyToManyField(blank=True,
                                        related_name='lg_tv',
                                        to='blog.Category_TV')),
                ('lgs_tv',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_TV')),
            ],
        ),
        migrations.CreateModel(
            name='ASUS',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('touch',
                 models.CharField(blank=True, db_index=True, max_length=30)),
                ('weight', models.CharField(db_index=True, max_length=30)),
                ('memory', models.CharField(db_index=True, max_length=30)),
                ('onnect', models.CharField(db_index=True, max_length=30)),
                ('thickness',
                 models.CharField(blank=True, db_index=True, max_length=30)),
                ('ssd', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('asus_a_laptop',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_a_laptop')),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='asus_a_laptop_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_a_laptop',
                 models.ManyToManyField(blank=True,
                                        related_name='asus_a_laptop',
                                        to='blog.Category_a_laptop')),
            ],
        ),
        migrations.CreateModel(
            name='Apple',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('connect', models.CharField(db_index=True, max_length=30)),
                ('memory', models.CharField(db_index=True, max_length=30)),
                ('camera', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('apple_phone',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_Phone')),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='apple_phone_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_phone',
                 models.ManyToManyField(blank=True,
                                        related_name='apple_phone',
                                        to='blog.Category_Phone')),
            ],
        ),
        migrations.CreateModel(
            name='ACER',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('touch',
                 models.CharField(blank=True, db_index=True, max_length=30)),
                ('weight', models.CharField(db_index=True, max_length=30)),
                ('memory', models.CharField(db_index=True, max_length=30)),
                ('onnect', models.CharField(db_index=True, max_length=30)),
                ('thickness', models.CharField(db_index=True, max_length=30)),
                ('ssd', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('acer_a_laptop',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_a_laptop')),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='acer_a_laptop_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_a_laptop',
                 models.ManyToManyField(blank=True,
                                        related_name='acer_a_laptop',
                                        to='blog.Category_a_laptop')),
            ],
        ),
    ]
Esempio n. 5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='MyUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(max_length=30, unique=True, verbose_name='Логин')),
                ('rateable', models.BooleanField(default=True)),
                ('avatar', imagekit.models.fields.ProcessedImageField(blank=True, upload_to=blog.models.MyUser.user_directory_path, verbose_name='Аватар')),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('is_active', models.BooleanField(default=True, verbose_name='Активен')),
                ('is_staff', models.BooleanField(default=False, verbose_name='Персонал')),
                ('moderated', models.BooleanField(default=False, verbose_name='Модерируется')),
                ('moderator', models.BooleanField(default=False, verbose_name='Модератор')),
                ('user_last_login', models.DateTimeField(auto_now=True)),
                ('date_joined', models.DateTimeField(auto_now_add=True)),
                ('can_post', models.BooleanField(default=True, verbose_name='Может добавлять посты')),
                ('can_comment', models.BooleanField(default=True, verbose_name='Может комментировать')),
                ('can_complain', models.BooleanField(default=True, verbose_name='Может жаловаться')),
                ('rating', models.FloatField(default=0.0, verbose_name='Рейтинг')),
                ('votes_amount', models.CharField(choices=[('U', 'Unlimited'), ('N', 'Normal'), ('B', 'Blocked')], default='N', max_length=1)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
            ],
            options={
                'verbose_name_plural': 'Пользователи',
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, unique=True)),
                ('description', models.TextField(max_length=400)),
                ('slug', models.CharField(blank=True, max_length=250, verbose_name='URL')),
                ('order', models.SmallIntegerField(blank=True, default=1)),
            ],
            options={
                'verbose_name_plural': 'categories',
                'ordering': ['order'],
            },
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(max_length=3700)),
                ('removed', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('rating', models.FloatField(default=0.0, verbose_name='Рейтинг')),
                ('can_complain', models.BooleanField(default=True, verbose_name='Разрешено жаловаться')),
                ('lft', models.PositiveIntegerField(db_index=True, editable=False)),
                ('rght', models.PositiveIntegerField(db_index=True, editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(db_index=True, editable=False)),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='blog.Comment')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Complain',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('edited', models.DateTimeField(auto_now=True)),
                ('score', models.FloatField(blank=True, default=0, null=True)),
                ('users_complained', models.TextField(blank=True, default='{}', max_length=2000, null=True)),
                ('comment', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='blog.Comment')),
            ],
            options={
                'verbose_name_plural': 'Жалобы',
                'ordering': ['edited'],
            },
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mform_type', models.CharField(blank=True, choices=[('Article', 'Статья'), ('SoftwareApplication', 'Приложение'), ('BlogPosting', 'Пост'), ('NewsArticle', 'Новость'), ('WebSite', 'Сайт')], max_length=30, null=True, verbose_name='Тип')),
                ('title', models.CharField(max_length=150, verbose_name='Заголовок')),
                ('private', models.BooleanField(default=False, verbose_name='NSFW')),
                ('rateable', models.BooleanField(default=True, verbose_name='Разрешено голосовать')),
                ('comments', models.BooleanField(default=True, verbose_name='Разрешено комментировать')),
                ('can_complain', models.BooleanField(default=True, verbose_name='Разрешено жаловаться')),
                ('locked', models.BooleanField(default=False, verbose_name='Не разрешать редактировать автору')),
                ('description', models.TextField(max_length=700, verbose_name='Описание')),
                ('text', models.TextField()),
                ('post_image', models.FileField(blank=True, max_length=500, null=True, upload_to='2017/3/31/', validators=[blog.functions.validate_post_image])),
                ('post_image_gif', models.FileField(blank=True, max_length=500, null=True, upload_to='2017/3/31/')),
                ('image_url', models.URLField(blank=True, max_length=1000, null=True)),
                ('main_image_srcset', models.TextField(blank=True, max_length=800, null=True)),
                ('post_thumbnail', models.ImageField(blank=True, max_length=500, null=True, upload_to='2017/3/31/')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('edited', models.DateTimeField(auto_now=True)),
                ('published', models.DateTimeField(default=django.utils.timezone.now)),
                ('rating', models.FloatField(default=0.0, verbose_name='Рейтинг')),
                ('url', models.CharField(blank=True, max_length=330)),
                ('status', models.CharField(choices=[('D', 'Черновик/удалён'), ('P', 'Опубликован')], default='D', max_length=1, verbose_name='Статус')),
                ('author', models.ForeignKey(default=1, on_delete=django.db.models.deletion.SET_DEFAULT, to=settings.AUTH_USER_MODEL)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.Category')),
            ],
            options={
                'verbose_name_plural': 'posts',
                'ordering': ['-published'],
            },
            bases=(meta.models.ModelMeta, models.Model),
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
                ('url', models.CharField(max_length=140, unique=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('private', models.BooleanField(default=False)),
                ('rateable', models.BooleanField(default=True)),
                ('description', models.TextField(blank=True, max_length=700, null=True)),
                ('rating', models.FloatField(default=0.0, verbose_name='Рейтинг')),
                ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='blog.Category')),
            ],
            options={
                'verbose_name_plural': 'Тэги',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='UserVotes',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('votes_amount', models.IntegerField(default=10)),
                ('weight', models.FloatField(default=0.25)),
                ('vote_type', models.CharField(choices=[('U', 'Unlimited'), ('N', 'Normal'), ('B', 'Blocked')], default='N', max_length=1)),
                ('block_date', models.DateTimeField(blank=True, null=True)),
                ('manual', models.BooleanField(default=False)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='post',
            name='main_tag',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='blog.Tag'),
        ),
        migrations.AddField(
            model_name='post',
            name='tags',
            field=models.ManyToManyField(blank=True, related_name='posts', related_query_name='tag', to='blog.Tag'),
        ),
        migrations.AddField(
            model_name='complain',
            name='post',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='blog.Post'),
        ),
        migrations.AddField(
            model_name='comment',
            name='post',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='blog.Post'),
        ),
        migrations.AddField(
            model_name='myuser',
            name='moderator_of_categories',
            field=models.ManyToManyField(blank=True, to='blog.Category', verbose_name='Модерирует категории'),
        ),
        migrations.AddField(
            model_name='myuser',
            name='moderator_of_tags',
            field=models.ManyToManyField(blank=True, to='blog.Tag', verbose_name='Модерирует тэги'),
        ),
        migrations.AddField(
            model_name='myuser',
            name='user_permissions',
            field=models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions'),
        ),
    ]