class Migration(migrations.Migration):

    dependencies = [
        ('base', '0007_indexpageslide'),
    ]

    operations = [
        migrations.CreateModel(
            name='IndexPageFeature',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('text', models.CharField(max_length=100,
                                          verbose_name='Текст')),
                ('picture',
                 models.ImageField(
                     default=None,
                     upload_to=base.models.IndexPageFeature.get_image_path,
                     verbose_name='Фото')),
                ('order',
                 models.PositiveIntegerField(default=0,
                                             verbose_name='Сортировать')),
            ],
            options={
                'verbose_name': 'Преимущество на главной странице',
                'verbose_name_plural': 'Преимущества на главной странице',
                'ordering': ['order'],
            },
        ),
    ]
Beispiel #2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Vote',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('voting_id', models.PositiveIntegerField()),
                ('voter_id', models.PositiveIntegerField()),
                ('a', base.models.BigBigField()),
                ('b', base.models.BigBigField()),
                ('voted', models.DateTimeField(auto_now=True)),
            ],
        ),
    ]
Beispiel #3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Cipher',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('a', base.models.BigBigField()),
                ('b', base.models.BigBigField()),
            ],
        ),
        migrations.CreateModel(
            name='Vote',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('voting_id', models.PositiveIntegerField()),
                ('voter_id', models.PositiveIntegerField()),
                ('voted', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.AddField(
            model_name='cipher',
            name='vote',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='ciphers',
                to='store.Vote'),
        ),
    ]
Beispiel #4
0
class Migration(migrations.Migration):

    dependencies = [
        ('base', '0008_indexpagefeature'),
    ]

    operations = [
        migrations.CreateModel(
            name='AboutPageImg',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('picture',
                 models.ImageField(
                     default=None,
                     upload_to=base.models.AboutPageImg.get_image_path,
                     verbose_name='Фото')),
                ('order',
                 models.PositiveIntegerField(default=0,
                                             verbose_name='Сортировать')),
            ],
            options={
                'verbose_name': 'Логотип компании',
                'verbose_name_plural': 'Логотипы компании',
                'ordering': ['order'],
            },
        ),
        migrations.CreateModel(
            name='AboutPageText',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('text',
                 ckeditor_uploader.fields.RichTextUploadingField(
                     verbose_name='Текст')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('base', '0006_auto_20200331_1603'),
    ]

    operations = [
        migrations.CreateModel(
            name='IndexPageSlide',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='Заголовок')),
                ('subtitle', models.CharField(max_length=300, verbose_name='Подзаголовок')),
                ('picture', models.ImageField(default=None, upload_to=base.models.IndexPageSlide.get_image_path, verbose_name='Фото')),
                ('order', models.PositiveIntegerField(default=0, verbose_name='Сортировать')),
            ],
            options={
                'verbose_name': 'Слайдер на главной странице',
                'verbose_name_plural': 'Слайдер на главной странице',
                'ordering': ['order'],
            },
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('government_structures', '0003_auto_20180312_1009'),
    ]

    operations = [
        migrations.CreateModel(
            name='SocioculturalDepartment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      help_text='creation date')),
                ('updated_at',
                 models.DateTimeField(auto_now=True,
                                      help_text='edition date',
                                      null=True)),
                ('name', models.CharField(max_length=100,
                                          verbose_name='name')),
                ('photo',
                 easy_thumbnails.fields.ThumbnailerImageField(
                     null=True,
                     upload_to=base.models.file_path,
                     verbose_name='photo')),
                ('twitter', models.CharField(max_length=50)),
                ('url', models.URLField(verbose_name='url')),
                ('government_structure',
                 models.OneToOneField(
                     default=base.models.lastest_government_structure,
                     on_delete=django.db.models.deletion.CASCADE,
                     to='government_structures.GovernmentStructure',
                     verbose_name='government structure')),
            ],
            options={
                'verbose_name':
                'sociocultural department',
                'verbose_name_plural':
                'sociocultural departments',
                'permissions': (('view_socioculturaldepartment',
                                 'Can view sociocultural department'), ),
            },
            bases=(parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='SocioculturalDepartmentTranslation',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('language_code',
                 models.CharField(db_index=True,
                                  max_length=15,
                                  verbose_name='Language')),
                ('title', models.CharField(max_length=50,
                                           verbose_name='title')),
                ('description',
                 djangocms_text_ckeditor.fields.HTMLField(
                     verbose_name='description')),
                ('master',
                 models.ForeignKey(
                     editable=False,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='translations',
                     to='sociocultural_departments.SocioculturalDepartment')),
            ],
            options={
                'verbose_name': 'sociocultural department Translation',
                'db_table':
                'sociocultural_departments_socioculturaldepartment_translation',
                'db_tablespace': '',
                'managed': True,
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='SocioculturalDepartmentURL',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      help_text='creation date')),
                ('updated_at',
                 models.DateTimeField(auto_now=True,
                                      help_text='edition date',
                                      null=True)),
                ('url', models.URLField(verbose_name='url')),
                ('order',
                 models.PositiveIntegerField(default=0, verbose_name='order')),
            ],
            options={
                'verbose_name':
                'sociocultural department url',
                'verbose_name_plural':
                'sociocultural department urls',
                'ordering': ('order', ),
                'permissions': (('view_socioculturaldepartment_url',
                                 'Can view sociocultural department url'), ),
            },
            bases=(parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='SocioculturalDepartmentURLTranslation',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('language_code',
                 models.CharField(db_index=True,
                                  max_length=15,
                                  verbose_name='Language')),
                ('name',
                 models.CharField(max_length=100,
                                  null=True,
                                  verbose_name='name')),
                ('description',
                 djangocms_text_ckeditor.fields.HTMLField(
                     verbose_name='description')),
                ('master',
                 models.ForeignKey(
                     editable=False,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='translations',
                     to='sociocultural_departments.SocioculturalDepartmentURL')
                 ),
            ],
            options={
                'verbose_name': 'sociocultural department url Translation',
                'db_table':
                'sociocultural_departments_socioculturaldepartmenturl_translation',
                'db_tablespace': '',
                'managed': True,
                'default_permissions': (),
            },
        ),
        migrations.AddField(
            model_name='socioculturaldepartment',
            name='urls',
            field=models.ManyToManyField(
                to='sociocultural_departments.SocioculturalDepartmentURL',
                verbose_name='urls'),
        ),
        migrations.AlterUniqueTogether(
            name='socioculturaldepartmenturltranslation',
            unique_together=set([('language_code', 'master')]),
        ),
        migrations.AlterUniqueTogether(
            name='socioculturaldepartmenttranslation',
            unique_together=set([('language_code', 'master')]),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('slug', models.SlugField(max_length=100, unique=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('description',
                 models.TextField(blank=True, max_length=10000, null=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('lft', models.PositiveIntegerField(editable=False)),
                ('rght', models.PositiveIntegerField(editable=False)),
                ('tree_id',
                 models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(editable=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='File',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('slug', models.SlugField(max_length=100, unique=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('description',
                 models.TextField(blank=True, max_length=10000, null=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('file', models.FileField(upload_to='')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('slug', models.SlugField(max_length=100, unique=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('description',
                 models.TextField(blank=True, max_length=10000, null=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('image', models.ImageField(upload_to='')),
                ('alt_text',
                 models.TextField(blank=True, max_length=1000, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('role',
                 models.CharField(choices=[('customer', 'Customer'),
                                           ('manager', 'Manager')],
                                  default=('customer', 'Customer'),
                                  max_length=20)),
                ('status', models.BooleanField(default=False)),
                ('phone_number',
                 models.CharField(blank=True, max_length=20, null=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('slug', models.SlugField(max_length=100, unique=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('description',
                 models.TextField(blank=True, max_length=10000, null=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('content', djrichtextfield.models.RichTextField()),
                ('Files', models.ManyToManyField(to='base.File')),
                ('categories', models.ManyToManyField(to='base.Category')),
                ('created_by',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='base.Profile')),
                ('images', models.ManyToManyField(to='base.Image')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='OTP',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('message',
                 models.CharField(blank=True,
                                  default=base.models.random_with_N_digits,
                                  max_length=7,
                                  null=True)),
                ('is_valid', models.BooleanField(default=True)),
                ('profile',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='base.Profile')),
            ],
        ),
        migrations.AddField(
            model_name='image',
            name='created_by',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='base.Profile'),
        ),
        migrations.AddField(
            model_name='file',
            name='created_by',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='base.Profile'),
        ),
        migrations.AddField(
            model_name='category',
            name='created_by',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='base.Profile'),
        ),
        migrations.AddField(
            model_name='category',
            name='parent',
            field=mptt.fields.TreeForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='children',
                to='base.Category'),
        ),
    ]