class Migration(migrations.Migration):

    dependencies = [
        ('api', '0002_news_thumbnail_image'),
    ]

    operations = [
        migrations.AddField(
            model_name='guestnews',
            name='image',
            field=models.ImageField(
                blank=True,
                null=True,
                upload_to=api.models.get_guest_news_image_path),
        ),
        migrations.AddField(
            model_name='guestnews',
            name='thumbnail_image',
            field=models.ImageField(blank=True, null=True, upload_to=''),
        ),
        migrations.AddField(
            model_name='sportsteam',
            name='logo_image',
            field=models.ImageField(
                blank=True,
                null=True,
                upload_to=api.models.get_team_logo_image_path),
        ),
    ]
Пример #2
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0003_auto_20200513_0032'),
    ]

    operations = [
        migrations.AddField(
            model_name='user',
            name='back_image',
            field=models.ImageField(null=True,
                                    storage=api.utils.OverwriteStorage(),
                                    upload_to=api.models.back_image_path),
        ),
        migrations.AlterField(
            model_name='user',
            name='email',
            field=models.EmailField(
                error_messages={'unique': 'Email is already taken'},
                max_length=254,
                unique=True),
        ),
        migrations.AlterField(
            model_name='user',
            name='photo',
            field=models.ImageField(null=True,
                                    storage=api.utils.OverwriteStorage(),
                                    upload_to=api.models.photo_image_path),
        ),
    ]
Пример #3
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0002_auto_20201230_2351'),
    ]

    operations = [
        migrations.CreateModel(
            name='Client',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('client_image',
                 models.ImageField(upload_to=api.models.client_logo,
                                   verbose_name='Client Logo')),
            ],
        ),
        migrations.CreateModel(
            name='Licenses',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('license_image',
                 models.ImageField(upload_to=api.models.license_images,
                                   verbose_name='License Photo')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0004_business_image'),
    ]

    operations = [
        migrations.AddField(
            model_name='category',
            name='image',
            field=models.ImageField(blank=True, null=True, upload_to=api.models.category_image_path),
        ),
        migrations.AddField(
            model_name='menu',
            name='image',
            field=models.ImageField(blank=True, null=True, upload_to=api.models.menu_image_path),
        ),
        migrations.AddField(
            model_name='menuitem',
            name='image',
            field=models.ImageField(blank=True, null=True, upload_to=api.models.menu_item_image_path),
        ),
        migrations.AlterField(
            model_name='business',
            name='image',
            field=models.ImageField(blank=True, null=True, upload_to=api.models.business_image_path),
        ),
    ]
Пример #5
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0009_auto_20190408_1431'),
    ]

    operations = [
        migrations.AddField(
            model_name='researchgroup',
            name='contact_person',
            field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to='api.Profile'),
        ),
        migrations.AddField(
            model_name='researchgroup',
            name='img_1',
            field=models.ImageField(blank=True, null=True, upload_to=api.models.path),
        ),
        migrations.AddField(
            model_name='researchgroup',
            name='img_2',
            field=models.ImageField(blank=True, null=True, upload_to=api.models.path),
        ),
        migrations.AddField(
            model_name='researchgroup',
            name='img_3',
            field=models.ImageField(blank=True, null=True, upload_to=api.models.path),
        ),
        migrations.AddField(
            model_name='researchgroup',
            name='img_4',
            field=models.ImageField(blank=True, null=True, upload_to=api.models.path),
        ),
    ]
Пример #6
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=58, 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=api.models.upload_avatar_path)),
                ('userProfile', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='userProfile', 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)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('img', models.ImageField(blank=True, null=True, upload_to=api.models.upload_post_path)),
                ('liked', models.ManyToManyField(blank=True, related_name='liked', to=settings.AUTH_USER_MODEL)),
                ('userPost', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='userPost', 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.CharField(max_length=100)),
                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Post')),
                ('userComment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='userComment', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Пример #7
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='GameImage',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(blank=True, upload_to='game_images/')),
            ],
        ),
        migrations.CreateModel(
            name='Level',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=50, null=True, verbose_name='Название')),
                ('timer', models.IntegerField(default=0, verbose_name='Таймер в минутах')),
                ('rating', models.IntegerField(default=0, verbose_name='+рейтинг')),
                ('balance', models.IntegerField(default=0, verbose_name='+баланс в %')),
            ],
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('image', models.ImageField(upload_to=api.models.game_images_dir)),
                ('code', models.CharField(default=uuid.uuid4, max_length=36)),
                ('lev', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='api.level')),
            ],
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('game_type', models.IntegerField(blank=True, null=True)),
                ('image', models.ImageField(blank=True, upload_to='games/')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('start', models.DateTimeField(auto_now_add=True)),
                ('result', models.BooleanField(default=False)),
                ('level', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.level')),
                ('player', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Пример #8
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0084_region_label'),
    ]

    operations = [
        migrations.AddField(
            model_name='country',
            name='is_deprecated',
            field=models.BooleanField(default=False, help_text='Is this an active, valid country?'),
        ),
        migrations.AddField(
            model_name='district',
            name='is_deprecated',
            field=models.BooleanField(default=False, help_text='Is this an active, valid district?'),
        ),
        migrations.AlterField(
            model_name='appealdocument',
            name='document',
            field=models.FileField(blank=True, null=True, upload_to=api.models.appeal_document_path, verbose_name='document'),
        ),
        migrations.AlterField(
            model_name='country',
            name='logo',
            field=models.FileField(blank=True, null=True, upload_to=api.models.logo_document_path, validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['png', 'jpg', 'gif'])], verbose_name='logo'),
        ),
        migrations.AlterField(
            model_name='countrysnippet',
            name='image',
            field=models.ImageField(blank=True, null=True, upload_to='countries/%Y/%m/%d/', verbose_name='image'),
        ),
        migrations.AlterField(
            model_name='regionsnippet',
            name='image',
            field=models.ImageField(blank=True, null=True, upload_to='regions/%Y/%m/%d/', verbose_name='image'),
        ),
        migrations.AlterField(
            model_name='situationreport',
            name='document',
            field=models.FileField(blank=True, null=True, upload_to=api.models.sitrep_document_path, verbose_name='document'),
        ),
        migrations.AlterField(
            model_name='snippet',
            name='image',
            field=models.ImageField(blank=True, null=True, upload_to=api.models.snippet_image_path, verbose_name='image'),
        ),
    ]
Пример #9
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0011_auto_20160924_2152'),
    ]

    operations = [
        migrations.CreateModel(
            name='CircleImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('datafile',
                 models.ImageField(
                     upload_to=api.models.circle_image_upload_to)),
                ('added', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('circle',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='api.Circle')),
            ],
        ),
    ]
Пример #10
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Inventory',
            fields=[
                ('audit_status', models.CharField(choices=[('active', 'ACTIVE'), ('inactive', 'INACTIVE'), ('deleted', 'DELETED')], default='active', help_text='Active or InActive', max_length=10)),
                ('created_on', models.DateTimeField(auto_now_add=True, help_text='On which date field is created')),
                ('modified_on', models.DateTimeField(auto_now=True, help_text='On which date field is modified')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(help_text='Name of Inventory', max_length=50, validators=[django.core.validators.MinLengthValidator(3)])),
                ('description', models.CharField(help_text='Inventory description', max_length=1440, validators=[django.core.validators.MinLengthValidator(3)])),
                ('price', models.DecimalField(decimal_places=2, help_text='Price of the Inventory', max_digits=8, validators=[django.core.validators.MinValueValidator(Decimal('0.50'))])),
                ('image', models.ImageField(help_text='Image Field for the Inventory', upload_to='media/', validators=[api.models.validate_image])),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
Пример #11
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='image',
            name='month',
            field=models.CharField(default='0', max_length=3),
        ),
        migrations.AddField(
            model_name='image',
            name='quarter',
            field=models.CharField(default='0', max_length=2),
        ),
        migrations.AlterField(
            model_name='image',
            name='url',
            field=models.ImageField(upload_to=api.models.upload_location),
        ),
        migrations.AlterField(
            model_name='image',
            name='year',
            field=models.CharField(default='0', max_length=5),
        ),
    ]
Пример #12
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=255)),
                ('description', models.TextField(blank=True, max_length=500)),
                ('image',
                 models.ImageField(
                     upload_to=api.models.PathAndRename('/image'))),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('user_id',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='user',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('image',
                 models.ImageField(upload_to=api.models.image_dir_path)),
                ('summary', models.TextField(max_length=1000)),
                ('slug',
                 models.SlugField(blank=True, editable=False, max_length=200)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
            ],
        ),
    ]
Пример #14
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0003_profile_type_account'),
    ]

    operations = [
        migrations.AddField(
            model_name='profile',
            name='city',
            field=models.CharField(blank=True, max_length=255, null=True),
        ),
        migrations.AddField(
            model_name='profile',
            name='phone',
            field=models.IntegerField(blank=True, null=True),
        ),
        migrations.AlterField(
            model_name='profile',
            name='avatar',
            field=models.ImageField(blank=True,
                                    null=True,
                                    upload_to=api.models.content_file_name),
        ),
    ]
Пример #15
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0011_auto_20180613_1750'),
    ]

    operations = [
        migrations.CreateModel(
            name='ProjectComment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment', models.TextField()),
                ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='api.Project')),
            ],
        ),
        migrations.AlterField(
            model_name='user',
            name='image',
            field=models.ImageField(blank=True, null=True, upload_to=api.models.upload_to),
        ),
        migrations.AddField(
            model_name='projectcomment',
            name='user',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='comments', to=settings.AUTH_USER_MODEL),
        ),
    ]
Пример #16
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Products',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=32)),
                ('desc', models.CharField(max_length=32)),
                ('image',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=api.models.upload_path)),
                ('available',
                 models.BooleanField(blank=True, default=False, null=True)),
            ],
        ),
    ]
Пример #17
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0005_auto_20200704_1617'),
    ]

    operations = [
        migrations.AlterField(
            model_name='image',
            name='img_route',
            field=models.ImageField(upload_to=api.models.images_directory_path, verbose_name='Ruta de la Imagen'),
        ),
        migrations.AlterField(
            model_name='order',
            name='payment_method_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Payment_method_order', to='api.Payment_method'),
        ),
        migrations.AlterField(
            model_name='order',
            name='shipping_method_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Shipping_method_order', to='api.Shipping_method'),
        ),
        migrations.AlterField(
            model_name='payment_data',
            name='payment_method_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Payment_method', to='api.Payment_method'),
        ),
    ]
Пример #18
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0003_auto_20200723_0047'),
    ]

    operations = [
        migrations.CreateModel(
            name='Model',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('type', models.CharField(max_length=100)),
                ('model', models.FileField(upload_to='models/')),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.AddField(
            model_name='actualimagedetails',
            name='created',
            field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='predictedimagedetails',
            name='created',
            field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='image',
            name='image',
            field=models.ImageField(upload_to=api.models.randomize_filename),
        ),
    ]
Пример #19
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('image', models.ImageField(blank=True, null=True, upload_to=api.models.get_image_path)),
                ('categories', models.ManyToManyField(to='api.Category')),
            ],
        ),
    ]
Пример #20
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0001_initial'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='image',
            name='file_path',
        ),
        migrations.AddField(
            model_name='image',
            name='image',
            field=models.ImageField(default='none.png',
                                    upload_to=api.models.get_image_filename,
                                    verbose_name='Image'),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='image',
            name='product',
            field=models.ForeignKey(
                default=None,
                on_delete=django.db.models.deletion.CASCADE,
                to='api.Product'),
        ),
    ]
Пример #21
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='UserData',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('user_id', models.IntegerField()),
                ('first_name', models.TextField()),
                ('last_name', models.TextField()),
                ('verified', models.BooleanField()),
                ('birthday', models.DateField()),
                ('photo',
                 models.ImageField(upload_to=api.models.user_directory_path)),
                ('photo_url', models.URLField()),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0008_auto_20190401_1949'),
    ]

    operations = [
        migrations.AlterField(
            model_name='album',
            name='album_art',
            field=models.ImageField(default='uploads/albumaart/default.png',
                                    upload_to=api.models.art_path),
        ),
        migrations.AlterField(
            model_name='customer',
            name='email',
            field=models.EmailField(max_length=254),
        ),
        migrations.AlterField(
            model_name='track',
            name='mp3',
            field=models.FileField(default='uploads/songs/null.mp3',
                                   upload_to=api.models.track_path),
        ),
    ]
Пример #23
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Status',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('content', models.TextField(blank=True, null=True)),
                ('image',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=api.models.upload_status_image)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now_add=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Hotel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Name', models.CharField(max_length=255)),
                ('image',
                 models.ImageField(null=True,
                                   upload_to=api.models.image_file_path)),
                ('description', models.TextField()),
                ('contact_no', models.IntegerField(max_length=20)),
                ('rating', models.IntegerField(max_length=5)),
            ],
        ),
    ]
Пример #25
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='profile',
            name='entertainer_name',
            field=models.CharField(blank=True, max_length=50),
        ),
        migrations.AddField(
            model_name='profile',
            name='facebook_url',
            field=models.CharField(blank=True, max_length=50),
        ),
        migrations.AddField(
            model_name='profile',
            name='insta_url',
            field=models.CharField(blank=True, max_length=50),
        ),
        migrations.AddField(
            model_name='profile',
            name='logo',
            field=models.ImageField(blank=True,
                                    upload_to=api.models.images_handler),
        ),
        migrations.AddField(
            model_name='profile',
            name='youtube_url',
            field=models.CharField(blank=True, max_length=50),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0002_auto_20200421_1741'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('username', models.CharField(max_length=100)),
                ('password', models.CharField(max_length=100)),
                ('email', models.CharField(max_length=150)),
            ],
        ),
        migrations.AlterModelOptions(
            name='product',
            options={'ordering': ['id']},
        ),
        migrations.AddField(
            model_name='category',
            name='image',
            field=models.ImageField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='category',
            name='imageUrl',
            field=models.CharField(default='', max_length=100),
        ),
        migrations.AlterUniqueTogether(
            name='product',
            unique_together={('name', 'price', 'description')},
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('price', models.FloatField(default='0.0')),
                ('orderDate', models.DateField()),
                ('discount', models.FloatField()),
                ('address', models.TextField()),
                ('product',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='api.Product')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='orders',
                                   to='api.User')),
            ],
        ),
    ]
Пример #27
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Phonebook',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Name', models.CharField(max_length=200)),
                ('ContactNumber', models.CharField(blank=True,
                                                   max_length=100)),
                ('Email', models.EmailField(max_length=100, unique=True)),
                ('Image',
                 models.ImageField(blank=True,
                                   default='',
                                   null=True,
                                   upload_to=api.models.upload_path)),
                ('IsDeleted', models.BooleanField(default=False)),
            ],
        ),
    ]
Пример #28
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='NutritionData',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('item_id', models.CharField(blank=True, help_text='(Item ID as obtained from the Nutritionix API)', max_length=25)),
                ('item_name', models.CharField(max_length=500)),
                ('item_image', models.ImageField(blank=True, max_length=200, null=True, upload_to=api.models.get_upload_path)),
                ('calories', models.DecimalField(blank=True, decimal_places=2, max_digits=20)),
                ('total_fat', models.DecimalField(blank=True, decimal_places=2, max_digits=20)),
                ('total_carbohydrate', models.DecimalField(blank=True, decimal_places=2, max_digits=20)),
                ('dietary_fiber', models.DecimalField(blank=True, decimal_places=2, max_digits=20)),
                ('sugars', models.DecimalField(blank=True, decimal_places=2, max_digits=20)),
                ('protein', models.DecimalField(blank=True, decimal_places=2, max_digits=20)),
                ('serving_size_qty', models.DecimalField(blank=True, decimal_places=2, max_digits=20)),
                ('serving_size_unit', models.CharField(blank=True, max_length=300)),
                ('serving_weight_grams', models.DecimalField(blank=True, decimal_places=2, max_digits=20)),
            ],
        ),
    ]
Пример #29
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Hub',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=255)),
                ('description', models.TextField()),
                ('logo',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=api.models.logo_destination)),
                ('practitioners',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.CharField(blank=True, max_length=100),
                     blank=True,
                     null=True,
                     size=None)),
            ],
        ),
    ]
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=255, unique=True)),
                ('name', models.CharField(max_length=255)),
                ('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='Ingredient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_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=255)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Recipe',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255)),
                ('time_minutes', models.IntegerField()),
                ('price', models.DecimalField(decimal_places=2, max_digits=5)),
                ('link', models.CharField(blank=True, max_length=255)),
                ('image', models.ImageField(null=True, upload_to=api.models.recipe_image_file_path)),
                ('ingredients', models.ManyToManyField(to='api.Ingredient')),
                ('tags', models.ManyToManyField(to='api.Tag')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]