Example #1
0
class Migration(migrations.Migration):

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
        ('core', '0005_auto_20180220_1151'),
    ]

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('avatar', models.ImageField(blank=True, null=True, upload_to=core.models.get_profile_image_path, verbose_name='Аватар')),
                ('activation', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.Activation', verbose_name='Активация')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'account',
                'abstract': False,
            },
            bases=('auth.user',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('core', '0010_auto_20210202_1504'),
    ]

    operations = [
        migrations.CreateModel(
            name='ImageAlbum',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
            ],
        ),
        migrations.AlterField(
            model_name='customer',
            name='user',
            field=models.OneToOneField(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='customer',
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('image',
                 models.ImageField(upload_to=core.models.get_upload_path)),
                ('default', models.BooleanField(default=False)),
                ('width', models.FloatField(default=100)),
                ('length', models.FloatField(default=100)),
                ('album',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='images',
                                   to='core.ImageAlbum')),
            ],
        ),
        migrations.AddField(
            model_name='item',
            name='album',
            field=models.OneToOneField(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='model',
                to='core.ImageAlbum'),
        ),
    ]
Example #3
0
class Migration(migrations.Migration):

    dependencies = [
        ('core', '0002_auto_20190528_0447'),
    ]

    operations = [
        migrations.CreateModel(
            name='Cart',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('ip_address',
                 models.GenericIPAddressField(blank=True, null=True)),
                ('is_ordered', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Items',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('quantity',
                 models.PositiveSmallIntegerField(
                     choices=[(1, '1'), (2, '2'), (3, '3')],
                     validators=[core.models.validate_quantity])),
                ('unit_price',
                 models.DecimalField(decimal_places=2,
                                     max_digits=18,
                                     verbose_name='unit price')),
                ('cart',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Cart')),
                ('product',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='core.Product')),
                ('product_img',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='core.ProductImage')),
            ],
        ),
    ]
Example #4
0
class Migration(migrations.Migration):

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
        ('core', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Activation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('valid_until', models.DateTimeField(verbose_name='Дата окончания действия ссылки активации')),
                ('url', models.URLField(verbose_name='Ссылка')),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('avatar', models.ImageField(blank=True, null=True, upload_to=core.models.get_profile_image_path, verbose_name='Аватар')),
                ('activation', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.Activation', verbose_name='Активация')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'account',
                'abstract': False,
            },
            bases=('auth.user',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='SiteSettings',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('activation_url_preiod', models.SmallIntegerField(default=100, verbose_name='Срок действия ссылки на активацию, ч.')),
                ('default_user_image', models.ImageField(blank=True, null=True, upload_to='', verbose_name='Аватар пользователя по умолчанию')),
            ],
            options={
                'verbose_name': 'Настройки сайта',
            },
        ),
        migrations.DeleteModel(
            name='Person',
        ),
    ]
Example #5
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('index', '0011_auto_20190412_1525'),
    ]

    operations = [
        migrations.CreateModel(
            name='Avatar',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('picture',
                 models.ImageField(
                     upload_to=index.models.percorso_cartella_utenti,
                     validators=[core.models.file_size])),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #6
0
class Migration(migrations.Migration):

    dependencies = [
        ('wagtailcore', '0040_page_draft_title'),
        ('export_readiness', '0045_auto_20190115_1058'),
    ]

    operations = [
        migrations.CreateModel(
            name='EUExitFormPages',
            fields=[
                ('page_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='wagtailcore.Page')),
                ('service_name',
                 models.CharField(choices=[
                     ('FIND_A_SUPPLIER', 'Find a Supplier'),
                     ('EXPORT_READINESS', 'Export Readiness'),
                     ('INVEST', 'Invest'), ('COMPONENTS', 'Components')
                 ],
                                  db_index=True,
                                  max_length=100,
                                  null=True)),
            ],
            options={
                'abstract': False,
            },
            bases=(core.models.ExclusivePageMixin, 'wagtailcore.page'),
        ),
    ]
Example #7
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('email_confirmed', models.BooleanField(default=False)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
            bases=(models.Model, core.models.DictDocumentMixin),
        ),
    ]
Example #8
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('core', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Profile2',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('avatar',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=core.models.get_profile_image_path,
                     verbose_name='Аватар')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #9
0
class Migration(migrations.Migration):

    dependencies = [
        ('core', '0002_auto_20201228_1917'),
    ]

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nickName', models.CharField(max_length=20)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('img',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=core.models.upload_path)),
                ('userPro',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='userPro',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #10
0
class Migration(migrations.Migration):

    dependencies = [
        ('core', '0013_auto_20210401_2313'),
    ]

    operations = [
        migrations.AlterField(
            model_name='lab',
            name='code',
            field=models.CharField(db_index=True,
                                   default=core.models.random_code,
                                   max_length=55,
                                   unique=True),
        ),
        migrations.AlterField(
            model_name='lab',
            name='name',
            field=models.CharField(db_index=True, max_length=255),
        ),
        migrations.AlterField(
            model_name='labjoin',
            name='created_by',
            field=models.OneToOneField(
                default=0,
                on_delete=django.db.models.deletion.CASCADE,
                to='core.user'),
            preserve_default=False,
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('wagtailcore', '0040_page_draft_title'),
        ('export_readiness',
         '0001_squashed_0009_performancedashboardpage_guidance_notes'),
    ]

    operations = [
        migrations.CreateModel(
            name='PerformanceDashboardNotesPage',
            fields=[
                ('page_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='wagtailcore.Page')),
                ('body',
                 core.model_fields.MarkdownField(
                     validators=[core.validators.slug_hyperlinks])),
            ],
            options={
                'abstract': False,
            },
            bases=(core.models.ExclusivePageMixin, 'wagtailcore.page'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('core', '0015_auto_20201123_1248'),
        ('services', '0010_auto_20201120_2334'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('financial', '0002_auto_20201121_1552'),
    ]

    operations = [
        migrations.AlterField(
            model_name='payment',
            name='client',
            field=models.ForeignKey(on_delete=models.SET(core.models.User.get_deleted_user), related_name='payments', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='payment',
            name='job',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='services.job'),
        ),
        migrations.AlterField(
            model_name='payment',
            name='professional',
            field=models.ForeignKey(null=True, on_delete=models.SET(core.models.Professional.get_deleted_professional), related_name='receipts', to='core.professional'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('core', '0020_user_image'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='user',
            name='image',
        ),
        migrations.CreateModel(
            name='Employe',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nom_employe', models.CharField(max_length=300)),
                ('prenom_employe', models.CharField(max_length=300)),
                ('tel', models.CharField(blank=True, max_length=300)),
                ('image', models.ImageField(null=True, upload_to=core.models.user_image_file_path)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'employes',
            },
        ),
    ]
Example #14
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Upload',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('password', models.CharField(default=core.models.generate_upload_password, max_length=32)),
                ('file', models.FileField(blank=True, null=True, upload_to='uploads/')),
                ('url', models.URLField(blank=True, null=True)),
                ('successful_attempts', models.IntegerField(default=0)),
                ('failed_attempts', models.IntegerField(default=0)),
                ('expires_at', models.DateTimeField(default=core.models.generate_expiry_datetime)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='UserAgent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.TextField()),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='last_user_agent', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #15
0
class Barber(models.AbstractBaseModel):
    user = models.OneToOneField('accounts.User',
                                on_delete=models.CASCADE,
                                related_name='barber')
    services = models.ManyToManyField('barber.service', related_name='barber')

    def __str__(self):
        return f'[{self.id}] {self.user.username}'
Example #16
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            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')),
                ('email', models.EmailField(max_length=50, unique=True)),
                ('is_active', models.BooleanField(default=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('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')),
                ('user_permissions', 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')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nickName', models.CharField(max_length=20)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('img', models.ImageField(blank=True, null=True, upload_to=core.models.upload_path)),
                ('userPro', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='userPro', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('message', models.CharField(max_length=140)),
                ('receiver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='receiver', to=settings.AUTH_USER_MODEL)),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sender', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='FriendRequest',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('approved', models.BooleanField(default=False)),
                ('askFrom', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='askFrom', to=settings.AUTH_USER_MODEL)),
                ('askTo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='askTo', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'unique_together': {('askFrom', 'askTo')},
            },
        ),
    ]
Example #17
0
class Migration(migrations.Migration):

    dependencies = [
        ('wagtailcore', '0040_page_draft_title'),
        ('wagtailforms', '0003_capitalizeverbose'),
        ('export_readiness', '0049_auto_20190207_0924'),
        ('great_international', '0006_internationaltopiclandingpage'),
    ]

    operations = [
        migrations.CreateModel(
            name='InternationalRegionPages',
            fields=[
                ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
                ('service_name', models.CharField(choices=[('FIND_A_SUPPLIER', 'Find a Supplier'), ('EXPORT_READINESS', 'Export Readiness'), ('INVEST', 'Invest'), ('COMPONENTS', 'Components'), ('GREAT_INTERNATIONAL', 'Great International')], db_index=True, max_length=100, null=True)),
                ('tags', modelcluster.fields.ParentalManyToManyField(blank=True, to='export_readiness.Tag')),
            ],
            options={
                'abstract': False,
            },
            bases=(core.models.ExclusivePageMixin, 'wagtailcore.page'),
        ),
        migrations.RemoveField(
            model_name='internationalukhqpages',
            name='page_ptr',
        ),
        migrations.AddField(
            model_name='internationalarticlelistingpage',
            name='tags',
            field=modelcluster.fields.ParentalManyToManyField(blank=True, to='export_readiness.Tag'),
        ),
        migrations.AddField(
            model_name='internationalarticlepage',
            name='tags',
            field=modelcluster.fields.ParentalManyToManyField(blank=True, to='export_readiness.Tag'),
        ),
        migrations.AddField(
            model_name='internationalcampaignpage',
            name='tags',
            field=modelcluster.fields.ParentalManyToManyField(blank=True, to='export_readiness.Tag'),
        ),
        migrations.AddField(
            model_name='internationalmarketingpages',
            name='tags',
            field=modelcluster.fields.ParentalManyToManyField(blank=True, to='export_readiness.Tag'),
        ),
        migrations.AddField(
            model_name='internationaltopiclandingpage',
            name='tags',
            field=modelcluster.fields.ParentalManyToManyField(blank=True, to='export_readiness.Tag'),
        ),
        migrations.DeleteModel(
            name='InternationalUKHQPages',
        ),
    ]
Example #18
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Permission',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('per_name', models.CharField(max_length=225)),
            ],
        ),
        migrations.CreateModel(
            name='Roles',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('role_id',
                 models.SlugField(default=core.models.random_roles_code,
                                  unique=True)),
                ('role_name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('full_name', models.CharField(max_length=250)),
                ('board', models.CharField(max_length=225)),
                ('branch', models.CharField(max_length=225)),
                ('dormitory_number', models.CharField(max_length=10)),
                ('Room_number', models.CharField(max_length=5)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            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')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='email address')),
                ('is_valid', models.BooleanField(default=False, verbose_name='is valid')),
                ('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')),
                ('user_permissions', 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')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', core.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='ResetPassword',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='user')),
            ],
        ),
        migrations.CreateModel(
            name='ValidationCode',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.UUIDField(default=uuid.uuid4, editable=False, verbose_name='validation code')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='validation_code', to=settings.AUTH_USER_MODEL, verbose_name='user')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('wagtailcore',
         '0041_group_collection_permissions_verbose_name_plural'),
        ('great_international',
         '0049_aboutditlandingpage_aboutditservicesfields_aboutditservicespage'
         ),
    ]

    operations = [
        migrations.CreateModel(
            name='InvestHighPotentialOpportunitiesPage',
            fields=[
                ('page_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='wagtailcore.Page')),
                ('service_name',
                 models.CharField(choices=[
                     ('FIND_A_SUPPLIER', 'Find a Supplier'),
                     ('EXPORT_READINESS', 'Export Readiness'),
                     ('INVEST', 'Invest'), ('COMPONENTS', 'Components'),
                     ('GREAT_INTERNATIONAL', 'Great International')
                 ],
                                  db_index=True,
                                  max_length=100,
                                  null=True)),
                ('uses_tree_based_routing',
                 models.BooleanField(
                     default=False,
                     help_text=
                     "Allow this page's URL to be determined by its slug, and the slugs of its ancestors in the page tree.",
                     verbose_name='tree-based routing enabled')),
            ],
            options={
                'abstract': False,
            },
            bases=(core.models.ExclusivePageMixin, 'wagtailcore.page',
                   great_international.panels.invest.
                   InvestHighPotentialOpportunitiesPagePanels),
        ),
    ]
Example #21
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Chassi',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('numero', models.CharField(help_text='Máximo 16 caracteres', max_length=16, verbose_name='Chassi')),
            ],
            options={
                'verbose_name': 'Chassi',
                'verbose_name_plural': 'Chassis',
            },
        ),
        migrations.CreateModel(
            name='Montadora',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=50, verbose_name='Nome')),
            ],
            options={
                'verbose_name': 'Montadora',
                'verbose_name_plural': 'Montadoras',
            },
        ),
        migrations.CreateModel(
            name='Carro',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('modelo', models.CharField(help_text='Máximo 30 caracteres', max_length=30, verbose_name='Modelo')),
                ('preco', models.DecimalField(decimal_places=2, max_digits=8, verbose_name='Preço')),
                ('chassi', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='core.Chassi')),
                ('montadora', models.ForeignKey(on_delete=models.SET(core.models.set_default_montadora), to='core.Montadora')),
            ],
            options={
                'verbose_name': 'Carro',
                'verbose_name_plural': 'Carros',
            },
        ),
    ]
Example #22
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('core', '0006_auto_20210107_1413'),
    ]

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('is_author', models.BooleanField(default=False)),
                ('is_publisher', models.BooleanField(default=False)),
                ('created_by',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   related_name='created_profiles',
                                   to=settings.AUTH_USER_MODEL)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AlterField(
            model_name='article',
            name='contents_file',
            field=models.FileField(
                upload_to=core.models.RenameFile('res/articles/')),
        ),
        migrations.AlterField(
            model_name='article',
            name='header_image',
            field=models.ImageField(
                upload_to=core.models.RenameFile('res/images/')),
        ),
        migrations.DeleteModel(name='AuthorProfile', ),
    ]
Example #23
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('birth_date', models.DateField(blank=True, null=True, verbose_name='Date of Birth')),
                ('about', models.TextField(blank=True, max_length=500)),
                ('avatar', models.ImageField(default=None, upload_to=core.models.user_avatar_path)),
                ('friends', models.ManyToManyField(blank=True, related_name='friends', to=settings.AUTH_USER_MODEL)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='user_profile', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.TextField(blank=True, max_length=1000)),
                ('image', models.ImageField(upload_to=core.models.user_directory_path)),
                ('date_pub', models.DateTimeField(default=django.utils.timezone.now)),
                ('date_edit', models.DateTimeField(default=django.utils.timezone.now)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('likes', models.ManyToManyField(blank=True, related_name='users_likes_it', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(max_length=700)),
                ('date_publish', models.DateTimeField(default=django.utils.timezone.now)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('in_post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Post')),
            ],
        ),
    ]
Example #24
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('core', '0015_auto_20201123_1248'),
        ('services', '0010_auto_20201120_2334'),
    ]

    operations = [
        migrations.AlterField(
            model_name='job',
            name='client',
            field=models.ForeignKey(on_delete=models.SET(
                core.models.User.get_deleted_user),
                                    related_name='hires',
                                    to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='job',
            name='professional',
            field=models.ForeignKey(on_delete=models.SET(
                core.models.Professional.get_deleted_professional),
                                    related_name='jobs',
                                    to='core.professional'),
        ),
        migrations.AlterField(
            model_name='job',
            name='proposal',
            field=models.OneToOneField(
                on_delete=django.db.models.deletion.PROTECT,
                related_name='job',
                to='services.proposal'),
        ),
        migrations.AlterField(
            model_name='rating',
            name='client',
            field=models.ForeignKey(on_delete=models.SET(
                core.models.User.get_deleted_user),
                                    related_name='rates',
                                    to=settings.AUTH_USER_MODEL),
        ),
    ]
Example #25
0
class Migration(migrations.Migration):

    dependencies = [
        ('core', '0012_auto_20180219_2024'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='sitesettings',
            options={'verbose_name': 'Настройки сайта'},
        ),
        migrations.AlterField(
            model_name='activation',
            name='url',
            field=models.URLField(verbose_name='Ссылка'),
        ),
        migrations.AlterField(
            model_name='activation',
            name='valid_until',
            field=models.DateTimeField(verbose_name='Ссылка активна до'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='activation',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.Activation', verbose_name='Активация'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='avatar',
            field=models.ImageField(blank=True, null=True, upload_to=core.models.get_profile_image_path, verbose_name='Аватар'),
        ),
        migrations.AlterField(
            model_name='sitesettings',
            name='activation_url_preiod',
            field=models.SmallIntegerField(default=100, verbose_name='Время действия ссылки, ч'),
        ),
        migrations.AlterField(
            model_name='sitesettings',
            name='default_user_image',
            field=models.ImageField(blank=True, null=True, upload_to='', verbose_name='Аватар по-умолчанию'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('core', '0011_auto_20160829_2222'),
    ]

    operations = [
        migrations.CreateModel(
            name='KITActivationCode',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('email_activation_code', randomslugfield.fields.RandomSlugField(blank=True, editable=False, length=20, max_length=20, unique=True)),
                ('phone_activation_code', models.CharField(default=core.models.get_random_integers, editable=False, max_length=5)),
                ('expired', models.BooleanField()),
                ('last_modified', models.DateTimeField(auto_now=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #27
0
class Migration(migrations.Migration):

    dependencies = [
        ('wagtailcore', '0040_page_draft_title'),
        ('wagtailforms', '0003_capitalizeverbose'),
        ('export_readiness', '0036_auto_20181105_1258'),
    ]

    operations = [
        migrations.CreateModel(
            name='ContactSuccessPage',
            fields=[
                ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
                ('service_name', models.CharField(choices=[('FIND_A_SUPPLIER', 'Find a Supplier'), ('EXPORT_READINESS', 'Export Readiness'), ('INVEST', 'Invest'), ('COMPONENTS', 'Components')], db_index=True, max_length=100, null=True)),
                ('heading', models.CharField(max_length=255, verbose_name='Title')),
                ('body_text', models.CharField(max_length=255, verbose_name='Body text')),
                ('next_title', models.CharField(max_length=255, verbose_name='Title')),
                ('next_body_text', models.CharField(max_length=255, verbose_name='Body text')),
            ],
            options={
                'abstract': False,
            },
            bases=(core.models.ExclusivePageMixin, 'wagtailcore.page'),
        ),
        migrations.RemoveField(
            model_name='deprecatedgetfinancepage',
            name='banner_image',
        ),
        migrations.RemoveField(
            model_name='deprecatedgetfinancepage',
            name='page_ptr',
        ),
        migrations.RemoveField(
            model_name='deprecatedgetfinancepage',
            name='ukef_logo',
        ),
        migrations.DeleteModel(
            name='DeprecatedGetFinancePage',
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('core', '0015_order_bukti_invo'),
    ]

    operations = [
        migrations.AddField(
            model_name='order',
            name='bayar',
            field=models.BooleanField(default=False),
        ),
        migrations.AlterField(
            model_name='order',
            name='bukti_invo',
            field=models.CharField(default=core.models.increment_invoice,
                                   max_length=25),
        ),
        migrations.CreateModel(
            name='BuktiBayar',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('foto', models.ImageField(upload_to='images/')),
                ('bukti_invo',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='core.Order')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #29
0
class Migration(migrations.Migration):

    dependencies = [
        ('wagtailcore', '0040_page_draft_title'),
        ('export_readiness',
         '0020_articlelistingpage_articlepage_topiclandingpage_squashed_0030_auto_20181005_1449'
         ),
    ]

    operations = [
        migrations.CreateModel(
            name='InternationalLandingPage',
            fields=[
                ('page_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='wagtailcore.Page')),
                ('service_name',
                 models.CharField(choices=[
                     ('FIND_A_SUPPLIER', 'Find a Supplier'),
                     ('EXPORT_READINESS', 'Export Readiness'),
                     ('INVEST', 'Invest')
                 ],
                                  db_index=True,
                                  max_length=100,
                                  null=True)),
            ],
            options={
                'abstract': False,
            },
            bases=(core.models.ExclusivePageMixin, 'wagtailcore.page'),
        ),
    ]
Example #30
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('phone', models.CharField(max_length=12)),
                ('image',
                 models.ImageField(
                     blank=True,
                     default='no-profile-picture.jpg',
                     null=True,
                     upload_to=core.models.get_upload_user_path)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.PROTECT,
                     related_name='Profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Perfil',
                'verbose_name_plural': 'Perfiles',
            },
        ),
    ]