Exemplo n.º 1
0
class Migration(migrations.Migration):

    dependencies = [
        ('news', '0005_article_article_image'),
    ]

    operations = [
        migrations.CreateModel(
            name='Photo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
            ],
        ),
        migrations.AlterField(
            model_name='article',
            name='article_image',
            field=models.ImageField(null=True, upload_to='cloudinary'),
        ),
    ]
Exemplo n.º 2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='categories',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('title', models.CharField(max_length=30)),
                ('description', models.TextField()),
                ('image_url', models.ImageField(blank=True,
                                                upload_to='images/')),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='images')),
                ('categories',
                 models.ManyToManyField(to='gallery.categories')),
                ('location',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='gallery.location')),
            ],
        ),
    ]
Exemplo n.º 3
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')),
                ('name', models.CharField(blank=True, max_length=30)),
                ('email', models.CharField(blank=True, max_length=100)),
                ('bio', models.TextField(max_length=100)),
                ('profile_image', models.ImageField(upload_to='images/')),
                ('follow', models.ManyToManyField(blank=True, related_name='follows', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', cloudinary.models.CloudinaryField(blank=True, max_length=255, verbose_name='images')),
                ('image_name', models.CharField(blank=True, max_length=30)),
                ('image_caption', models.CharField(blank=True, max_length=500)),
                ('likes', models.PositiveIntegerField(default=0)),
                ('date_posted', models.DateTimeField(default=django.utils.timezone.now)),
                ('profile', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='instagram.profile')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment', models.TextField(blank=True, max_length=500)),
                ('date_posted', models.DateTimeField(default=django.utils.timezone.now)),
                ('image', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='instagram.image')),
                ('user', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemplo n.º 4
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='FlashCards',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(blank=True,
                                           max_length=50,
                                           null=True)),
                ('name', models.CharField(max_length=30)),
                ('description',
                 models.TextField(blank=True, max_length=200, null=True)),
                ('pub_date', models.DateTimeField(auto_now_add=True,
                                                  null=True)),
                ('category',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('image',
                 models.ImageField(blank=True,
                                   default='default.jpg',
                                   null=True,
                                   upload_to='media/')),
                ('images',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='images')),
                ('user',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='flashcards',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('blog', '0010_auto_20171119_0955'),
    ]

    operations = [
        migrations.AlterField(
            model_name='post',
            name='postpic',
            field=cloudinary.models.CloudinaryField(max_length=255,
                                                    verbose_name=b'image'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='profpic',
            field=models.ImageField(blank=True, upload_to=b''),
        ),
    ]
Exemplo n.º 6
0
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0010_auto_20190201_1922'),
    ]

    operations = [
        migrations.AddField(
            model_name='customuser',
            name='cloud_img',
            field=cloudinary.models.CloudinaryField(default=django.utils.timezone.now, max_length=255, verbose_name='image'),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='customuser',
            name='avatar',
            field=models.ImageField(default='/users/a.jpg', upload_to='users/'),
        ),
    ]
Exemplo n.º 7
0
class Migration(migrations.Migration):

    dependencies = [
        ('myawwards', '0007_rating_post'),
    ]

    operations = [
        migrations.AddField(
            model_name='profile',
            name='bio',
            field=models.TextField(blank=True,
                                   default='My Bio',
                                   max_length=500),
        ),
        migrations.AddField(
            model_name='profile',
            name='contact',
            field=models.EmailField(blank=True, max_length=100),
        ),
        migrations.AddField(
            model_name='profile',
            name='location',
            field=models.CharField(blank=True, max_length=60),
        ),
        migrations.AddField(
            model_name='profile',
            name='name',
            field=models.CharField(blank=True, max_length=120),
        ),
        migrations.AlterField(
            model_name='post',
            name='image',
            field=cloudinary.models.CloudinaryField(max_length=255,
                                                    verbose_name='media'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='image',
            field=models.ImageField(default='profile_pics/default.jpg',
                                    upload_to='profile_pics'),
        ),
    ]
Exemplo n.º 8
0
class Migration(migrations.Migration):

    dependencies = [
        ('realtors', '0004_auto_20200903_1457'),
    ]

    operations = [
        migrations.AlterField(
            model_name='realtor',
            name='hire_date',
            field=models.DateTimeField(default=datetime.datetime(
                2020, 9, 3, 14, 42, 16, 792654, tzinfo=utc)),
        ),
        migrations.AlterField(
            model_name='realtor',
            name='photo',
            field=models.ImageField(
                upload_to='',
                verbose_name=cloudinary.models.CloudinaryField(
                    max_length=255, verbose_name='image')),
        ),
    ]
Exemplo n.º 9
0
class Migration(migrations.Migration):

    dependencies = [
        ('main_app', '0005_auto_20201018_1801'),
    ]

    operations = [
        migrations.AlterField(
            model_name='post',
            name='image',
            field=models.ImageField(blank=True,
                                    default='images/default_city.png',
                                    null=True,
                                    upload_to='images'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='image',
            field=cloudinary.models.CloudinaryField(
                default='images/default.jpg',
                max_length=255,
                verbose_name='image'),
        ),
    ]
Exemplo n.º 10
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')),
                ('category', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('place', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Photo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
            ],
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image', models.ImageField(upload_to='')),
                ('name', models.CharField(max_length=50)),
                ('description', models.TextField()),
                ('category',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='mygalleria.category')),
                ('location',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='mygalleria.location')),
            ],
        ),
    ]
Exemplo n.º 11
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='brands',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('NameA', models.TextField(max_length=2550, null=True)),
                ('NameL', models.TextField(max_length=2550)),
            ],
        ),
        migrations.CreateModel(
            name='cartTransactionMasters',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('DateCreated', models.DateTimeField()),
            ],
        ),
        migrations.CreateModel(
            name='cartTransactions',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('Quantity', models.FloatField()),
                ('IsOrdered', models.IntegerField()),
                ('MasterId',
                 models.ForeignKey(
                     db_column='MasterId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.carttransactionmasters')),
            ],
        ),
        migrations.CreateModel(
            name='categories',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('NameA', models.TextField(max_length=2550, null=True)),
                ('NameL', models.TextField(max_length=2550)),
                ('Level', models.IntegerField()),
                ('ImageUrl', models.TextField(max_length=2550, null=True)),
                ('MainCategoryId',
                 models.ForeignKey(
                     db_column='MainCategoryId',
                     db_constraint=False,
                     default='null',
                     null=True,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.categories')),
            ],
        ),
        migrations.CreateModel(
            name='countries',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('NameA', models.TextField(max_length=2550, null=True)),
                ('NameL', models.TextField(max_length=2550)),
                ('Symbol', models.TextField(max_length=2550)),
            ],
        ),
        migrations.CreateModel(
            name='orders',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('UnitPrice', models.FloatField()),
                ('TotalPrice', models.FloatField()),
                ('isDelivered', models.BooleanField()),
                ('Latitude', models.TextField(max_length=2550, null=True)),
                ('Longitude', models.TextField(max_length=2550, null=True)),
                ('Quantity', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='orderStatus',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('Code', models.IntegerField()),
                ('StatusNameA', models.TextField(max_length=2550, null=True)),
                ('StatusNameL', models.TextField(max_length=2550)),
            ],
        ),
        migrations.CreateModel(
            name='products',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('NameA', models.TextField(max_length=2550, null=True)),
                ('NameL', models.TextField(max_length=2550)),
                ('Image', models.ImageField(blank=True,
                                            null=True,
                                            upload_to='')),
                ('Image2',
                 models.ImageField(blank=True, null=True, upload_to='')),
                ('Image3',
                 models.ImageField(blank=True, null=True, upload_to='')),
                ('Image4',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('Description', models.TextField(max_length=2550, null=True)),
                ('BrandId',
                 models.ForeignKey(
                     db_column='BrandId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.brands')),
                ('CategoryId',
                 models.ForeignKey(
                     db_column='CategoryId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.categories')),
            ],
        ),
        migrations.CreateModel(
            name='shippingAgents',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('NameA', models.TextField(max_length=2550, null=True)),
                ('NameL', models.TextField(max_length=2550)),
                ('Address1', models.TextField(max_length=2550)),
                ('Address2', models.TextField(max_length=2550, null=True)),
                ('Phone', models.TextField(max_length=2550, null=True)),
                ('Email', models.TextField(max_length=2550)),
                ('Password', models.TextField(max_length=2550)),
                ('PostCode', models.TextField(max_length=2550, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='specifications',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('NameA', models.TextField(max_length=2550, null=True)),
                ('NameL', models.TextField(max_length=2550)),
                ('ShowInFilter', models.BooleanField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='specificationValue',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('Name', models.TextField(max_length=2550)),
            ],
        ),
        migrations.CreateModel(
            name='stores',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('NameA', models.TextField(max_length=2550, null=True)),
                ('NameL', models.TextField(max_length=2550)),
                ('Email', models.TextField(max_length=2550)),
                ('Address', models.TextField(max_length=2550, null=True)),
                ('City', models.TextField(max_length=2550)),
                ('Latitude', models.TextField(max_length=2550, null=True)),
                ('Longitude', models.TextField(max_length=2550, null=True)),
                ('CountryId',
                 models.ForeignKey(
                     db_column='CountryId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.countries')),
                ('ShippingAgentId',
                 models.ForeignKey(
                     db_column='ShippingAgentId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.shippingagents')),
            ],
        ),
        migrations.CreateModel(
            name='transactionTypes',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('Code', models.IntegerField()),
                ('NameA', models.TextField(max_length=2550, null=True)),
                ('NameL', models.TextField(max_length=2550)),
            ],
        ),
        migrations.CreateModel(
            name='users',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('NameA', models.TextField(max_length=2550, null=True)),
                ('NameL', models.TextField(max_length=2550)),
                ('Email', models.TextField(max_length=2550)),
                ('Password', models.TextField(max_length=2550)),
                ('Address1', models.TextField(max_length=2550, null=True)),
                ('Address2', models.TextField(max_length=2550, null=True)),
                ('Phone', models.IntegerField(null=True)),
                ('City', models.TextField(max_length=2550, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='vendors',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('NameA', models.TextField(max_length=2550, null=True)),
                ('NameL', models.TextField(max_length=2550)),
                ('Address1', models.TextField(max_length=2550)),
                ('Address2', models.TextField(max_length=2550, null=True)),
                ('Phone', models.TextField(max_length=2550, null=True)),
                ('Email', models.TextField(max_length=2550)),
                ('Password', models.TextField(max_length=2550)),
                ('PostCode', models.TextField(max_length=2550, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='vendorPriceLists',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('Price', models.FloatField()),
                ('CountryId',
                 models.ForeignKey(
                     db_column='CountryId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.countries')),
                ('ProductId',
                 models.ForeignKey(
                     db_column='ProductId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.products')),
                ('VendorId',
                 models.ForeignKey(
                     db_column='VendorId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.vendors')),
            ],
        ),
        migrations.CreateModel(
            name='storeShippingAgents',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('ShippingAgentId',
                 models.ForeignKey(
                     db_column='ShippingAgentId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.shippingagents')),
                ('StoreId',
                 models.ForeignKey(
                     db_column='StoreId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.stores')),
            ],
        ),
        migrations.AddField(
            model_name='stores',
            name='VendorId',
            field=models.ForeignKey(
                db_column='VendorId',
                db_constraint=False,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='PyCommerce.vendors'),
        ),
        migrations.CreateModel(
            name='shippingDetails',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('DeliveryNotes', models.TextField(max_length=2550,
                                                   null=True)),
                ('OrderId',
                 models.ForeignKey(
                     db_column='OrderId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.orders')),
                ('ShippingAgentId',
                 models.ForeignKey(
                     db_column='ShippingAgentId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.shippingagents')),
            ],
        ),
        migrations.CreateModel(
            name='shippingAgentUsers',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('ShippingAgentId',
                 models.ForeignKey(
                     db_column='ShippingAgentId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.shippingagents')),
                ('UserId',
                 models.ForeignKey(
                     db_column='UserId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.users')),
            ],
        ),
        migrations.CreateModel(
            name='productStoreRatings',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('RatingId', models.IntegerField()),
                ('ProductReview', models.TextField(max_length=2550,
                                                   null=True)),
                ('ProductId',
                 models.ForeignKey(
                     db_column='ProductId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.products')),
                ('StoreId',
                 models.ForeignKey(
                     db_column='StoreId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.stores')),
                ('UserId',
                 models.ForeignKey(
                     db_column='UserId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.users')),
            ],
        ),
        migrations.CreateModel(
            name='productSpecifications',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('SpecificationName', models.TextField(max_length=2550)),
                ('SpecificationValue', models.TextField(max_length=2550)),
                ('ShowInFilter', models.BooleanField(null=True)),
                ('CategoryId',
                 models.ForeignKey(
                     db_column='CategoryId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.categories')),
                ('ProductId',
                 models.ForeignKey(
                     db_column='ProductId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.products')),
                ('SpecificationId',
                 models.ForeignKey(
                     db_column='SpecificationId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.specifications')),
            ],
        ),
        migrations.AddField(
            model_name='orders',
            name='DeliveredByUserId',
            field=models.ForeignKey(
                db_column='DeliveredByUserId',
                db_constraint=False,
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name='UserId',
                to='PyCommerce.users'),
        ),
        migrations.AddField(
            model_name='orders',
            name='MasterId',
            field=models.ForeignKey(
                db_column='MasterId',
                db_constraint=False,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='PyCommerce.carttransactionmasters'),
        ),
        migrations.AddField(
            model_name='orders',
            name='ProductId',
            field=models.ForeignKey(
                db_column='ProductId',
                db_constraint=False,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='PyCommerce.products'),
        ),
        migrations.AddField(
            model_name='orders',
            name='ShippingAgentId',
            field=models.ForeignKey(
                db_column='ShippingAgentId',
                db_constraint=False,
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='PyCommerce.shippingagents'),
        ),
        migrations.AddField(
            model_name='orders',
            name='StoreId',
            field=models.ForeignKey(
                db_column='StoreId',
                db_constraint=False,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='PyCommerce.stores'),
        ),
        migrations.AddField(
            model_name='orders',
            name='UserId',
            field=models.ForeignKey(
                db_column='UserId',
                db_constraint=False,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='PyCommerce.users'),
        ),
        migrations.AddField(
            model_name='orders',
            name='cartId',
            field=models.ForeignKey(
                db_column='CartId',
                db_constraint=False,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='PyCommerce.carttransactions'),
        ),
        migrations.CreateModel(
            name='orderMasters',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('DateCreated', models.DateTimeField()),
                ('ShippingAddress', models.TextField(max_length=2550,
                                                     null=True)),
                ('OrderStatusId',
                 models.ForeignKey(
                     db_column='OrderStatusId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.orderstatus')),
                ('UserId',
                 models.ForeignKey(
                     db_column='UserId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.users')),
                ('cartId',
                 models.ForeignKey(
                     db_column='CartId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.carttransactions')),
            ],
        ),
        migrations.CreateModel(
            name='inventoryDetails',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('Quantity', models.FloatField()),
                ('ProductId',
                 models.ForeignKey(
                     db_column='ProductId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.products')),
                ('StoreId',
                 models.ForeignKey(
                     db_column='StoreId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.stores')),
            ],
        ),
        migrations.CreateModel(
            name='inventoryBalances',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('QuantityBalance', models.FloatField()),
                ('ProductId',
                 models.ForeignKey(
                     db_column='ProductId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.products')),
                ('StoreId',
                 models.ForeignKey(
                     db_column='StoreId',
                     db_constraint=False,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='PyCommerce.stores')),
            ],
        ),
        migrations.AddField(
            model_name='carttransactions',
            name='ProductId',
            field=models.ForeignKey(
                db_column='ProductId',
                db_constraint=False,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='PyCommerce.products'),
        ),
        migrations.AddField(
            model_name='carttransactions',
            name='StoreId',
            field=models.ForeignKey(
                db_column='StoreId',
                db_constraint=False,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='PyCommerce.stores'),
        ),
    ]
Exemplo n.º 12
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')),
                ('image',
                 models.ImageField(default='default.jpg',
                                   upload_to='profile_pics/')),
                ('bio', models.CharField(max_length=255)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'profile',
            },
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   null=True,
                                                   verbose_name='images')),
                ('caption', models.CharField(max_length=200)),
                ('likes', models.PositiveIntegerField(default=0)),
                ('posted_at', models.DateTimeField(auto_now=True)),
                ('profile',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='insta.Profile')),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.CharField(max_length=100)),
                ('created_date',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('post',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='comments',
                                   to='insta.Post')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'comment',
            },
        ),
    ]
Exemplo n.º 13
0
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')),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Chef',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name', models.CharField(max_length=30)),
                ('last_name', models.CharField(max_length=30)),
                ('email', models.EmailField(max_length=254)),
                ('phone_number', models.CharField(blank=True, max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='foods',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=60)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('profile_pic', models.ImageField(upload_to='images/')),
                ('bio', models.CharField(max_length=300)),
                ('username',
                 models.CharField(default='Your username', max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='RecipeMerch',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=40)),
                ('description', models.TextField()),
                ('price', models.DecimalField(decimal_places=2,
                                              max_digits=20)),
            ],
        ),
        migrations.CreateModel(
            name='RecipeRecipients',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
                ('email', models.EmailField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='Recipe',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('food_name', models.CharField(max_length=60)),
                ('ingredients', models.TextField()),
                ('procedure', models.TextField()),
                ('post', tinymce.models.HTMLField(default='1')),
                ('pub_date', models.DateTimeField(auto_now_add=True)),
                ('food_image',
                 models.ImageField(blank=True,
                                   default='1',
                                   upload_to='recipe/')),
                ('chef',
                 models.ForeignKey(blank=True,
                                   default='1',
                                   on_delete=django.db.models.deletion.CASCADE,
                                   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=60)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('image',
                 cloudinary.models.CloudinaryField(default='media/default.jpg',
                                                   max_length=255,
                                                   verbose_name='images')),
                ('food_name', models.CharField(default='1', max_length=60)),
                ('ingredients', models.TextField(default='1')),
                ('procedure', models.TextField(default='1')),
                ('post', tinymce.models.HTMLField(default='1')),
                ('category',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='recipeapp.category')),
                ('chef',
                 models.ForeignKey(blank=True,
                                   default='1',
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('location',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='recipeapp.location')),
                ('profile',
                 models.ForeignKey(default='1',
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='recipeapp.profile')),
            ],
            options={
                'ordering': ['name'],
            },
        ),
    ]
Exemplo n.º 14
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('vote_score', models.IntegerField(db_index=True, default=0)),
                ('num_vote_up', models.PositiveIntegerField(db_index=True, default=0)),
                ('num_vote_down', models.PositiveIntegerField(db_index=True, default=0)),
                ('iimage_url', cloudinary.models.CloudinaryField(blank=True, max_length=255, verbose_name='image')),
                ('imageName', models.CharField(max_length=100)),
                ('caption', models.CharField(max_length=200)),
                ('date_uploaded', models.DateTimeField(auto_now_add=True)),
                ('like_add', models.PositiveIntegerField(default=0)),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-date_uploaded'],
            },
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='auth.user')),
                ('image', models.ImageField(blank=True, null=True, upload_to='cloudinary')),
                ('biography', tinymce.models.HTMLField(blank=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Likes',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('vote_score', models.IntegerField(db_index=True, default=0)),
                ('num_vote_up', models.PositiveIntegerField(db_index=True, default=0)),
                ('num_vote_down', models.PositiveIntegerField(db_index=True, default=0)),
                ('image', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='instaApp.image')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Follow',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('follower', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='follower', to=settings.AUTH_USER_MODEL)),
                ('following', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='following', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment', models.CharField(blank=True, max_length=250)),
                ('posted', models.DateTimeField(auto_now_add=True)),
                ('image', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='instaApp.image')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemplo n.º 15
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Banner',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(default='', upload_to='game/images')),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Color',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Size',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
                ('color', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='game.Color')),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(blank=True, max_length=100)),
                ('last_name', models.CharField(blank=True, max_length=100)),
                ('email', models.EmailField(max_length=150)),
                ('address1', models.CharField(default='', max_length=250)),
                ('address2', models.CharField(default='', max_length=250)),
                ('city', models.CharField(default='', max_length=100)),
                ('state', models.CharField(default='', max_length=100)),
                ('gender', models.CharField(blank=True, choices=[('Male', 'Male'), ('Female', 'Female'), ('Other', 'Other')], max_length=11)),
                ('pin', models.CharField(default='', max_length=15)),
                ('country', models.CharField(default='', max_length=50)),
                ('mobileno', models.CharField(default=0, max_length=12)),
                ('user', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('product_name', models.CharField(default='', max_length=50)),
                ('desc', models.CharField(default='', max_length=300)),
                ('sub_category', models.CharField(default='', max_length=50)),
                ('price', models.IntegerField(default=0)),
                ('pub_date', models.DateField(auto_now_add=True)),
                ('image', models.ImageField(default='', upload_to='game/images')),
                ('category', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to='game.Category')),
                ('favs', models.ManyToManyField(blank=True, related_name='favs', to=settings.AUTH_USER_MODEL)),
                ('likes', models.ManyToManyField(blank=True, related_name='likes', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Happy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('happy_name', models.CharField(max_length=50)),
                ('review', models.CharField(max_length=300)),
                ('pub_date', models.DateField()),
                ('image', models.ImageField(default='', upload_to='game/images')),
                ('like_count', models.IntegerField(default=0)),
                ('happylikes', models.ManyToManyField(blank=True, related_name='happylikes', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Design',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.PositiveIntegerField(null=True)),
                ('title', models.CharField(blank=True, max_length=200, verbose_name='Title')),
                ('image', cloudinary.models.CloudinaryField(blank=True, max_length=255, verbose_name='image')),
                ('color', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='game.Color')),
                ('item', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='game.Item')),
                ('owner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('size', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='game.Size')),
            ],
        ),
        migrations.AddField(
            model_name='color',
            name='item',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='game.Item'),
        ),
    ]
Exemplo n.º 16
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.TextField(null=True)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='user_comment',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('location',
                 models.CharField(blank=True, max_length=50, null=True)),
                ('bio', models.TextField(max_length=120, null=True)),
                ('avatar',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('pictures',
                 models.ImageField(null=True,
                                   upload_to=insta.models.user_directory_path,
                                   verbose_name='Picture')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Stream',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date', models.DateTimeField()),
                ('following',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='stream_following',
                                   to=settings.AUTH_USER_MODEL)),
                ('profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='insta.profile')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('image',
                 models.ImageField(null=True,
                                   upload_to=insta.models.user_directory_path,
                                   verbose_name='Picture')),
                ('image_name', models.CharField(max_length=120, null=True)),
                ('caption',
                 models.TextField(max_length=1000,
                                  null=True,
                                  verbose_name='Caption')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('like', models.IntegerField(default=0)),
                ('comment',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='post_comment',
                                   to='insta.comment')),
                ('profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='post_profile',
                                   to='insta.profile')),
            ],
        ),
        migrations.CreateModel(
            name='Likes',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('post',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='post_like',
                                   to='insta.post')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='user_like',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Follow',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('follower',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='follower',
                                   to=settings.AUTH_USER_MODEL)),
                ('following',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='following',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemplo n.º 17
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0007_alter_validators_add_error_messages'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     help_text=
                     'Required. 30 characters or fewer. Letters, numbers and @/./+/-/_ characters',
                     max_length=30,
                     unique=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             re.compile('^[\\w.@+-]+$', 32),
                             'Enter a valid username.', 'invalid')
                     ],
                     verbose_name='username')),
                ('full_name',
                 models.CharField(max_length=254, verbose_name='full name')),
                ('short_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='short name')),
                ('sex',
                 models.CharField(choices=[('Male', 'Male'),
                                           ('Female', 'Female')],
                                  max_length=30,
                                  verbose_name='sex')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='email address')),
                ('phone_number',
                 models.CharField(max_length=20,
                                  validators=[
                                      django.core.validators.RegexValidator(
                                          re.compile('^[0-9]+$', 32),
                                          'Only numbers are allowed.',
                                          'invalid')
                                  ],
                                  verbose_name='phone number')),
                ('user_type',
                 models.CharField(choices=[('Driver', 'Driver'),
                                           ('Passenger', 'Passenger')],
                                  max_length=30,
                                  verbose_name='user type')),
                ('address',
                 models.TextField(max_length=400, verbose_name='location')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_verified',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user is a vershified user',
                     verbose_name='user verified')),
                ('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')),
                ('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',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='DriverInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('liscence_no',
                 models.CharField(max_length=30,
                                  verbose_name='liscence number')),
                ('date_issuance',
                 models.DateField(blank=True,
                                  verbose_name='date of first issuance')),
                ('scanned',
                 models.ImageField(
                     blank=True,
                     upload_to='',
                     verbose_name="picture of driver's liscence")),
                ('confirmed',
                 models.BooleanField(default=False, verbose_name='confirmed')),
                ('driver',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Follow',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('time',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='time')),
                ('followee',
                 models.ForeignKey(default=None,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='followee',
                                   to=settings.AUTH_USER_MODEL)),
                ('follower',
                 models.ForeignKey(default=None,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='follower',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('subject',
                 models.CharField(default='(No Subject)', max_length=256)),
                ('message', models.TextField()),
                ('date',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='time sent')),
                ('read', models.BooleanField(default=False,
                                             verbose_name='read')),
                ('deleted',
                 models.BooleanField(default=False, verbose_name='deleted')),
                ('recipient',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='recipient',
                                   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='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('picture',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   default='user.png',
                                                   max_length=255,
                                                   verbose_name='picture')),
                ('education', models.TextField(blank=True)),
                ('work', models.TextField(blank=True)),
                ('social_facebook', models.CharField(blank=True,
                                                     max_length=256)),
                ('social_twitter', models.CharField(blank=True,
                                                    max_length=256)),
                ('social_instagram',
                 models.CharField(blank=True, max_length=256)),
                ('bio', models.TextField(blank=True)),
                ('is_public', models.BooleanField(default=False)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemplo n.º 18
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')),
                ('profile_pic',
                 models.ImageField(default='default.png', upload_to='media/')),
                ('bio',
                 models.TextField(blank=True, default='My Bio',
                                  max_length=350)),
                ('name', models.CharField(blank=True, max_length=150)),
                ('location', models.CharField(blank=True, max_length=50)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='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')),
                ('name', models.CharField(blank=True, max_length=250)),
                ('caption', models.CharField(blank=True, max_length=250)),
                ('created', models.DateTimeField(auto_now_add=True,
                                                 null=True)),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('likes',
                 models.ManyToManyField(blank=True,
                                        related_name='likes',
                                        to=settings.AUTH_USER_MODEL)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='posts',
                                   to='instaClone.profile')),
            ],
            options={
                'ordering': ['-pk'],
            },
        ),
        migrations.CreateModel(
            name='Follow',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('followed',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='followers',
                                   to='instaClone.profile')),
                ('follower',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='following',
                                   to='instaClone.profile')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.TextField()),
                ('created', models.DateTimeField(auto_now_add=True,
                                                 null=True)),
                ('post',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='comments',
                                   to='instaClone.post')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='comments',
                                   to='instaClone.profile')),
            ],
            options={
                'ordering': ['-pk'],
            },
        ),
    ]
Exemplo n.º 19
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')),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('image_name', models.CharField(max_length=32)),
                ('caption', models.TextField()),
                ('post_date', models.DateTimeField(auto_now_add=True,
                                                   null=True)),
                ('likes', models.IntegerField(default=0)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-post_date'],
            },
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image', models.ImageField(default=None,
                                            upload_to='images/')),
                ('profile_photo',
                 models.ImageField(
                     default=
                     'image/upload/v1594245831/media/profile_photo/profile_mgr0hh.png',
                     upload_to='profile_photo/')),
                ('bio', models.TextField(default='')),
                ('user',
                 models.OneToOneField(
                     default=None,
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            bases=(models.Model, snaps.models.ModelMethods),
        ),
        migrations.CreateModel(
            name='ImageLike',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='snaps.Image')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            bases=(models.Model, snaps.models.ModelMethods),
        ),
        migrations.CreateModel(
            name='Followers',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('follower',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='followers',
                                   to=settings.AUTH_USER_MODEL)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='users',
                                   to=settings.AUTH_USER_MODEL)),
            ],
            bases=(models.Model, snaps.models.ModelMethods),
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.TextField()),
                ('image',
                 models.ForeignKey(default=None,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='snaps.Image')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            bases=(models.Model, snaps.models.ModelMethods),
        ),
    ]
Exemplo n.º 20
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')),
                ('bio', models.TextField(blank=True)),
                ('photo', models.ImageField(upload_to='',
                                            verbose_name='image')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('image_name', models.CharField(max_length=255)),
                ('description', models.TextField()),
                ('pub_date', models.DateTimeField(auto_now_add=True)),
                ('Author',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('likes',
                 models.ManyToManyField(blank=True,
                                        related_name='likes',
                                        to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.TextField(blank=True)),
                ('pub_date', models.DateTimeField(auto_now_add=True)),
                ('author',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('image',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='Instangram.Image')),
            ],
        ),
    ]
Exemplo n.º 21
0
class Migration(migrations.Migration):

    dependencies = [
        ('listings', '0005_auto_20200903_1457'),
    ]

    operations = [
        migrations.AlterField(
            model_name='listing',
            name='list_date',
            field=models.DateTimeField(blank=True,
                                       default=datetime.datetime(2020,
                                                                 9,
                                                                 3,
                                                                 14,
                                                                 42,
                                                                 16,
                                                                 889334,
                                                                 tzinfo=utc)),
        ),
        migrations.AlterField(
            model_name='listing',
            name='photo_1',
            field=models.ImageField(
                blank=True,
                upload_to='',
                verbose_name=cloudinary.models.CloudinaryField(
                    max_length=255, verbose_name='image')),
        ),
        migrations.AlterField(
            model_name='listing',
            name='photo_2',
            field=models.ImageField(
                blank=True,
                upload_to='',
                verbose_name=cloudinary.models.CloudinaryField(
                    max_length=255, verbose_name='image')),
        ),
        migrations.AlterField(
            model_name='listing',
            name='photo_3',
            field=models.ImageField(
                blank=True,
                upload_to='',
                verbose_name=cloudinary.models.CloudinaryField(
                    max_length=255, verbose_name='image')),
        ),
        migrations.AlterField(
            model_name='listing',
            name='photo_4',
            field=models.ImageField(
                blank=True,
                upload_to='',
                verbose_name=cloudinary.models.CloudinaryField(
                    max_length=255, verbose_name='image')),
        ),
        migrations.AlterField(
            model_name='listing',
            name='photo_5',
            field=models.ImageField(
                blank=True,
                upload_to='',
                verbose_name=cloudinary.models.CloudinaryField(
                    max_length=255, verbose_name='image')),
        ),
        migrations.AlterField(
            model_name='listing',
            name='photo_6',
            field=models.ImageField(
                blank=True,
                upload_to='',
                verbose_name=cloudinary.models.CloudinaryField(
                    max_length=255, verbose_name='image')),
        ),
        migrations.AlterField(
            model_name='listing',
            name='photo_main',
            field=models.ImageField(
                upload_to='',
                verbose_name=cloudinary.models.CloudinaryField(
                    max_length=255, verbose_name='image')),
        ),
    ]
Exemplo n.º 22
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='UserAccount',
            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')),
                ('email',
                 models.EmailField(max_length=70,
                                   unique=True,
                                   verbose_name='email')),
                ('username', models.CharField(max_length=70, unique=True)),
                ('is_admin', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('is_superuser', models.BooleanField(default=False)),
                ('is_staff', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        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='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(default='default-avatar.jpg',
                                   upload_to='')),
                ('url', models.URLField(blank=True, max_length=300)),
                ('description', models.TextField(blank=True, max_length=200)),
                ('country',
                 models.CharField(blank=True,
                                  choices=[('CaC', 'Choose a Country'),
                                           ('Angola', 'Angola'),
                                           ('Afghanistan', 'Afghanistan'),
                                           ('Argentina', ' Argentina'),
                                           ('Algeria', 'Algeria'),
                                           ('Australia', 'Australia'),
                                           ('Austria', 'Austria'),
                                           ('Belgium', 'Belgium'),
                                           ('Burkinafaso', 'Burkina-Faso'),
                                           ('Botswana', 'Botswana'),
                                           ('Brazil', 'Brazil'),
                                           ('China', 'China'),
                                           ('Congo', 'Congo'),
                                           ('Cameroon', 'Cameroon'),
                                           ('Cuba', 'Cuba'),
                                           ('Denmark', 'Denmark'),
                                           ('Egypt', 'Egypt'),
                                           ('Ethiopia', 'Ethiopia'),
                                           ('Estonia', 'Estonia'),
                                           ('France', 'France'),
                                           ('Fiji', 'Fiji'),
                                           ('France', 'France'),
                                           ('Ghana', 'Ghana'),
                                           ('Gabon', 'Gabon'),
                                           ('Guinea', 'Guinea'),
                                           ('Germany', 'Germany'),
                                           ('Granada', 'Granada'),
                                           ('Hongkong', 'Hong-Kong'),
                                           ('Haiti', 'Haiti'),
                                           ('Hungary', 'Hungary'),
                                           ('Italy', 'Italy'),
                                           ('Indonesia', 'Indonesia'),
                                           ('Japan', 'Japan'),
                                           ('Kenya', 'Kenya'),
                                           ('Kuwait', 'Kuwait'),
                                           ('Liberia', 'Liberia'),
                                           ('Rwanda', 'Rwanda'),
                                           ('Sudan', 'Sudan'),
                                           ('Southafrica', 'South Africa'),
                                           ('Tanzania', 'Tanzania'),
                                           ('Uganda', 'Uganda')],
                                  default='CaC',
                                  max_length=100)),
                ('career',
                 models.CharField(choices=[
                     ('Freelance', 'Individual / Freelance'),
                     ('Agency', 'Agency - More than 10 people'),
                     ('Studio', 'Studio - 10 people or fewer')
                 ],
                                  default='Freelance',
                                  max_length=100)),
                ('twitter',
                 models.URLField(blank=True, default='https://twitter.com/')),
                ('facebook',
                 models.URLField(blank=True,
                                 default='https://www.facebook.com/')),
                ('linkedin',
                 models.URLField(blank=True, default='https://linkedin.com/')),
                ('instagram',
                 models.URLField(blank=True,
                                 default='https://instagram.com/')),
                ('date_joined', models.DateTimeField(auto_now_add=True)),
                ('last_login', models.DateTimeField(auto_now=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('-date_joined', ),
            },
        ),
        migrations.CreateModel(
            name='Projects',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('sitename', models.CharField(max_length=300)),
                ('siteurl', models.URLField(max_length=300)),
                ('siteimage',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('description', models.TextField(max_length=300)),
                ('technology',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('country',
                 models.CharField(choices=[('CaC', 'Choose a Country'),
                                           ('Angola', 'Angola'),
                                           ('Afghanistan', 'Afghanistan'),
                                           ('Argentina', ' Argentina'),
                                           ('Algeria', 'Algeria'),
                                           ('Australia', 'Australia'),
                                           ('Austria', 'Austria'),
                                           ('Belgium', 'Belgium'),
                                           ('Burkinafaso', 'Burkina-Faso'),
                                           ('Botswana', 'Botswana'),
                                           ('Brazil', 'Brazil'),
                                           ('China', 'China'),
                                           ('Congo', 'Congo'),
                                           ('Cameroon', 'Cameroon'),
                                           ('Cuba', 'Cuba'),
                                           ('Denmark', 'Denmark'),
                                           ('Egypt', 'Egypt'),
                                           ('Ethiopia', 'Ethiopia'),
                                           ('Estonia', 'Estonia'),
                                           ('France', 'France'),
                                           ('Fiji', 'Fiji'),
                                           ('France', 'France'),
                                           ('Ghana', 'Ghana'),
                                           ('Gabon', 'Gabon'),
                                           ('Guinea', 'Guinea'),
                                           ('Germany', 'Germany'),
                                           ('Granada', 'Granada'),
                                           ('Hongkong', 'Hong-Kong'),
                                           ('Haiti', 'Haiti'),
                                           ('Hungary', 'Hungary'),
                                           ('Italy', 'Italy'),
                                           ('Indonesia', 'Indonesia'),
                                           ('Japan', 'Japan'),
                                           ('Kenya', 'Kenya'),
                                           ('Kuwait', 'Kuwait'),
                                           ('Liberia', 'Liberia'),
                                           ('Rwanda', 'Rwanda'),
                                           ('Sudan', 'Sudan'),
                                           ('Southafrica', 'South Africa'),
                                           ('Tanzania', 'Tanzania'),
                                           ('Uganda', 'Uganda')],
                                  default='CaC',
                                  max_length=100)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('category',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='category',
                                   to='awwards_users.category')),
                ('profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='owner',
                                   to='awwards_users.profile')),
            ],
            options={
                'ordering': ('-created', ),
            },
        ),
    ]
Exemplo n.º 23
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('tags', models.CharField(max_length=100)),
            ],
        ),
        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=40, unique=True)),
                ('first_name', models.CharField(blank=True, max_length=30)),
                ('last_name', models.CharField(blank=True, max_length=30)),
                ('is_active', models.BooleanField(default=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('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')),
                ('profile_picture',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   verbose_name='picture')),
                ('bio', models.CharField(blank=True, max_length=100)),
                ('contacts', models.CharField(blank=True, max_length=30)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='InterventionRecord',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('description', models.TextField(blank=True, null=True)),
                ('time_of_creation', models.DateTimeField(auto_now_add=True)),
                ('time_last_edit', models.DateTimeField(auto_now=True)),
                ('status',
                 models.CharField(blank=True,
                                  choices=[('Under Investigation',
                                            'Under Investigation'),
                                           ('rejected', 'rejected'),
                                           ('resolved', 'resolved')],
                                  max_length=20,
                                  null=True)),
                ('location', models.CharField(blank=True, max_length=50)),
                ('image',
                 models.ImageField(blank=True,
                                   storage=cloudinary_storage.storage.
                                   MediaCloudinaryStorage(),
                                   upload_to='images/interventionimages/')),
                ('videos',
                 models.FileField(
                     blank=True,
                     storage=cloudinary_storage.storage.
                     VideoMediaCloudinaryStorage(),
                     upload_to='videos/',
                     validators=[cloudinary_storage.validators.validate_video
                                 ])),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Flag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('description', models.TextField()),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now_add=True)),
                ('latitude',
                 models.DecimalField(decimal_places=6,
                                     default='',
                                     max_digits=9)),
                ('longitude',
                 models.DecimalField(decimal_places=6,
                                     default='',
                                     max_digits=9)),
                ('image',
                 models.ImageField(blank=True,
                                   storage=cloudinary_storage.storage.
                                   MediaCloudinaryStorage(),
                                   upload_to='images/flagimages/')),
                ('videos',
                 models.FileField(
                     blank=True,
                     storage=cloudinary_storage.storage.
                     VideoMediaCloudinaryStorage(),
                     upload_to='videos/',
                     validators=[cloudinary_storage.validators.validate_video
                                 ])),
                ('tags', models.ManyToManyField(to='IReporter.Tag')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Flags',
            },
        ),
    ]