示例#1
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='BooleanProductVote',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('votes', models.IntegerField(default=0)),
                ('attribute', models.CharField(max_length=100, validators=[networkapi.buyersguide.validators.ValueListValidator(valid_values=['confidence'])])),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='BuyersGuideProductCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('description', models.TextField(blank=True, help_text='Description of the product category. Max. 300 characters.', max_length=300)),
                ('featured', models.BooleanField(default=False, help_text="Featured category will appear first on Buyer's Guide site nav")),
                ('hidden', models.BooleanField(default=False, help_text="Hidden categories will not appear in the Buyer's Guide site nav at all")),
                ('slug', models.SlugField(blank=True, help_text='A URL-friendly version of the product name. This is an auto-generated field.')),
            ],
            options={
                'verbose_name': 'Buyers Guide Product Category',
                'verbose_name_plural': 'Buyers Guide Product Categories',
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('draft', models.BooleanField(default=True, help_text='When checked, this product will only show for CMS-authenticated users')),
                ('adult_content', models.BooleanField(default=False, help_text='When checked, product thumbnail will appear blurred as well as have an 18+ badge on it')),
                ('review_date', models.DateField(help_text='Review date of this product')),
                ('name', models.CharField(blank=True, help_text='Name of Product', max_length=100)),
                ('slug', models.CharField(blank=True, default=None, editable=False, help_text='slug used in urls', max_length=256)),
                ('company', models.CharField(blank=True, help_text='Name of Company', max_length=100)),
                ('blurb', models.TextField(blank=True, help_text='Description of the product', max_length=5000)),
                ('url', models.URLField(blank=True, help_text='Link to this product page', max_length=2048)),
                ('price', models.CharField(blank=True, help_text='Price', max_length=100)),
                ('image', models.FileField(blank=True, help_text='Image representing this product', max_length=2048, upload_to=networkapi.buyersguide.pagemodels.get_product_image_upload_path.get_product_image_upload_path)),
                ('cloudinary_image', cloudinary.models.CloudinaryField(blank=True, help_text='Image representing this product - hosted on Cloudinary', max_length=255, verbose_name='image')),
                ('meets_minimum_security_standards', models.BooleanField(help_text='Does this product meet minimum security standards?', null=True)),
                ('uses_encryption', networkapi.buyersguide.fields.ExtendedYesNoField(help_text='Does the product use encryption?')),
                ('uses_encryption_helptext', models.TextField(blank=True, max_length=5000)),
                ('security_updates', networkapi.buyersguide.fields.ExtendedYesNoField(help_text='Security updates?')),
                ('security_updates_helptext', models.TextField(blank=True, max_length=5000)),
                ('strong_password', networkapi.buyersguide.fields.ExtendedYesNoField()),
                ('strong_password_helptext', models.TextField(blank=True, max_length=5000)),
                ('manage_vulnerabilities', networkapi.buyersguide.fields.ExtendedYesNoField(help_text='Manages security vulnerabilities?')),
                ('manage_vulnerabilities_helptext', models.TextField(blank=True, max_length=5000)),
                ('privacy_policy', networkapi.buyersguide.fields.ExtendedYesNoField(help_text='Does this product have a privacy policy?')),
                ('privacy_policy_helptext', models.TextField(blank=True, max_length=5000)),
                ('share_data', models.BooleanField(help_text='Does the maker share data with other companies?', null=True)),
                ('share_data_helptext', models.TextField(blank=True, max_length=5000)),
                ('how_does_it_share', models.CharField(blank=True, help_text='How does this product handle data?', max_length=5000)),
                ('user_friendly_privacy_policy', networkapi.buyersguide.fields.ExtendedYesNoField(help_text='Does this product have a user-friendly privacy policy?')),
                ('user_friendly_privacy_policy_helptext', models.TextField(blank=True, max_length=5000)),
                ('worst_case', models.CharField(blank=True, help_text="What's the worst thing that could happen by using this product?", max_length=5000)),
                ('phone_number', models.CharField(blank=True, help_text='Phone Number', max_length=100)),
                ('live_chat', models.CharField(blank=True, help_text='Live Chat', max_length=100)),
                ('email', models.CharField(blank=True, help_text='Email', max_length=100)),
                ('twitter', models.CharField(blank=True, help_text='Twitter username', max_length=100)),
                ('product_category', models.ManyToManyField(blank=True, related_name='pniproduct', to='buyersguide.BuyersGuideProductCategory')),
                ('related_products', models.ManyToManyField(blank=True, related_name='related_pniproduct', to='buyersguide.Product')),
            ],
            options={
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='RangeProductVote',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('votes', models.IntegerField(default=0)),
                ('attribute', models.CharField(max_length=100, validators=[networkapi.buyersguide.validators.ValueListValidator(valid_values=['creepiness'])])),
                ('average', models.IntegerField(validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(100)])),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='range_product_votes', to='buyersguide.Product')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Update',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('source', models.URLField(help_text='Link to source', max_length=2048)),
                ('title', models.CharField(max_length=256)),
                ('author', models.CharField(blank=True, max_length=256)),
                ('featured', models.BooleanField(default=False, help_text='feature this update at the top of the list?')),
                ('snippet', models.TextField(blank=True, max_length=5000)),
            ],
        ),
        migrations.CreateModel(
            name='GeneralProduct',
            fields=[
                ('product_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='buyersguide.Product')),
                ('camera_device', networkapi.buyersguide.fields.ExtendedYesNoField(help_text='Does this device have or access a camera?')),
                ('camera_app', networkapi.buyersguide.fields.ExtendedYesNoField(help_text='Does the app have or access a camera?')),
                ('microphone_device', networkapi.buyersguide.fields.ExtendedYesNoField(help_text='Does this Device have or access a microphone?')),
                ('microphone_app', networkapi.buyersguide.fields.ExtendedYesNoField(help_text='Does this app have or access a microphone?')),
                ('location_device', networkapi.buyersguide.fields.ExtendedYesNoField(help_text='Does this product access your location?')),
                ('location_app', networkapi.buyersguide.fields.ExtendedYesNoField(help_text='Does this app access your location?')),
                ('delete_data', models.BooleanField(help_text='Can you request data be deleted?', null=True)),
                ('delete_data_helptext', models.TextField(blank=True, max_length=5000)),
                ('parental_controls', networkapi.buyersguide.fields.ExtendedYesNoField(help_text='Are there rules for children?', null=True)),
                ('child_rules_helptext', models.TextField(blank=True, max_length=5000)),
                ('collects_biometrics', networkapi.buyersguide.fields.ExtendedYesNoField(help_text='Does this product collect biometric data?')),
                ('collects_biometrics_helptext', models.TextField(blank=True, max_length=5000)),
            ],
            options={
                'abstract': False,
            },
            bases=('buyersguide.product',),
        ),
        migrations.CreateModel(
            name='SoftwareProduct',
            fields=[
                ('product_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='buyersguide.Product')),
                ('handles_recordings_how', models.TextField(blank=True, help_text='How does this software handle your recordings', max_length=5000)),
                ('recording_alert', networkapi.buyersguide.fields.ExtendedYesNoField(help_text='Alerts when calls are being recorded?', null=True)),
                ('recording_alert_helptext', models.TextField(blank=True, max_length=5000)),
                ('signup_with_email', models.BooleanField(help_text='Email required to sign up?', null=True)),
                ('signup_with_phone', models.BooleanField(help_text='Phone number required to sign up?', null=True)),
                ('signup_with_third_party', models.BooleanField(help_text='Third Party account required to sign up?', null=True)),
                ('signup_methods_helptext', models.TextField(blank=True, help_text='Describe the kind of contact information requirements for signing up for this product', max_length=5000)),
                ('medical_privacy_compliant', models.BooleanField(help_text='Compliant with US medical privacy laws?', null=True)),
                ('medical_privacy_compliant_helptext', models.TextField(blank=True, max_length=5000)),
                ('host_controls', models.TextField(blank=True, max_length=5000)),
                ('easy_to_learn_and_use', models.BooleanField(help_text='Is it easy to learn & use the features?', null=True)),
                ('easy_to_learn_and_use_helptext', models.TextField(blank=True, max_length=5000)),
            ],
            options={
                'abstract': False,
            },
            bases=('buyersguide.product',),
        ),
        migrations.CreateModel(
            name='RangeVoteBreakdown',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('count', models.IntegerField(default=0)),
                ('bucket', models.IntegerField(validators=[networkapi.buyersguide.validators.ValueListValidator(valid_values=[0, 1, 2, 3, 4])])),
                ('product_vote', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='buyersguide.RangeProductVote')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='RangeVote',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('attribute', models.CharField(max_length=100, validators=[networkapi.buyersguide.validators.ValueListValidator(valid_values=['creepiness'])])),
                ('value', models.IntegerField(validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(100)])),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='buyersguide.Product')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ProductPrivacyPolicyLink',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sort_order', models.IntegerField(blank=True, editable=False, null=True)),
                ('label', models.CharField(help_text='Label for this link on the product page', max_length=500)),
                ('url', models.URLField(blank=True, help_text='Privacy policy URL', max_length=2048)),
                ('product', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='privacy_policy_links', to='buyersguide.Product')),
            ],
            options={
                'verbose_name': 'Buyers Guide Product Privacy Policy link',
                'verbose_name_plural': 'Buyers Guide Product Privacy Policy links',
            },
        ),
        migrations.AddField(
            model_name='product',
            name='updates',
            field=models.ManyToManyField(blank=True, related_name='pniproduct', to='buyersguide.Update'),
        ),
        migrations.CreateModel(
            name='BooleanVoteBreakdown',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('count', models.IntegerField(default=0)),
                ('bucket', models.IntegerField(validators=[networkapi.buyersguide.validators.ValueListValidator(valid_values=[0, 1])])),
                ('product_vote', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='buyersguide.BooleanProductVote')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='BooleanVote',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('attribute', models.CharField(max_length=100, validators=[networkapi.buyersguide.validators.ValueListValidator(valid_values=['confidence'])])),
                ('value', models.BooleanField()),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='buyersguide.Product')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='booleanproductvote',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='boolean_product_votes', to='buyersguide.Product'),
        ),

        migrations.RunPython(create_default_categories),
    ]
示例#2
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Activity',
            fields=[
                ('activity_id',
                 models.BigAutoField(primary_key=True, serialize=False)),
                ('activity', models.CharField(db_index=True, max_length=100)),
            ],
            options={
                'verbose_name_plural': 'activities',
            },
        ),
        migrations.CreateModel(
            name='ActivityType',
            fields=[
                ('activity_type_id',
                 models.BigIntegerField(primary_key=True, serialize=False)),
                ('activity_type',
                 models.CharField(db_index=True, max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='UserActivity',
            fields=[
                ('user_activity_id',
                 models.BigAutoField(primary_key=True, serialize=False)),
                ('location', models.CharField(max_length=200)),
                ('lat', models.CharField(max_length=100)),
                ('lon', models.CharField(max_length=100)),
                ('monday', models.BooleanField(default=True)),
                ('tuesday', models.BooleanField(default=True)),
                ('wednesday', models.BooleanField(default=True)),
                ('thursday', models.BooleanField(default=True)),
                ('friday', models.BooleanField(default=True)),
                ('saturday', models.BooleanField(default=False)),
                ('sunday', models.BooleanField(default=False)),
                ('open_from', models.TimeField()),
                ('open_to', models.TimeField()),
                ('description', models.CharField(max_length=350)),
                ('activity',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='main.Activity')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserActivityAlbum',
            fields=[
                ('user_activity_album_id',
                 models.BigAutoField(primary_key=True, serialize=False)),
                ('photo',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('user_activity',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='main.UserActivity')),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('gender',
                 models.CharField(choices=[('M', 'Male'), ('F', 'Female')],
                                  default='M',
                                  max_length=1)),
                ('location',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('join_date', models.DateField(auto_now_add=True)),
                ('phone', models.CharField(blank=True,
                                           max_length=20,
                                           null=True)),
                ('score',
                 models.DecimalField(blank=True,
                                     decimal_places=4,
                                     max_digits=10,
                                     null=True)),
                ('profile_picture',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Deal',
            fields=[
                ('deal_id',
                 models.BigAutoField(primary_key=True, serialize=False)),
                ('request_date', models.DateTimeField(auto_now_add=True)),
                ('request_modified', models.DateTimeField(auto_now=True)),
                ('status',
                 models.CharField(choices=[('R', 'Request'), ('A', 'Accepted'),
                                           ('D', 'Declined'),
                                           ('F', 'Finished')],
                                  default='R',
                                  max_length=1)),
                ('rating', models.IntegerField(default=5)),
                ('review', models.TextField(blank=True, null=True)),
                ('request_from',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('request_to',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='request_to',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='activity',
            name='activity_type',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='main.ActivityType'),
        ),
    ]
示例#3
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('HMS', '0004_auto_20180420_1206'),
    ]

    operations = [
        migrations.RenameModel(
            old_name='Registeration',
            new_name='Booking',
        ),
        migrations.AlterModelOptions(
            name='booking',
            options={
                'verbose_name': 'Booking',
                'verbose_name_plural': 'Bookings'
            },
        ),
        migrations.AlterModelOptions(
            name='room',
            options={
                'ordering': ['room_number', 'room_type'],
                'verbose_name': 'Room',
                'verbose_name_plural': 'Rooms'
            },
        ),
        migrations.AlterModelOptions(
            name='roomtype',
            options={
                'ordering': ['type_id', 'type_name'],
                'verbose_name': 'Room Type',
                'verbose_name_plural': 'Room Types'
            },
        ),
        migrations.AddField(
            model_name='profile',
            name='profile_pic',
            field=cloudinary.models.CloudinaryField(
                blank=True, max_length=255, verbose_name='profile picture'),
        ),
        migrations.AlterField(
            model_name='image',
            name='description',
            field=models.CharField(blank=True, max_length=1000),
        ),
        migrations.AlterField(
            model_name='image',
            name='room_number',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='images',
                to='HMS.Room'),
        ),
        migrations.AlterField(
            model_name='room',
            name='price',
            field=models.IntegerField(help_text='Enter the price of the room',
                                      verbose_name='Price of the room'),
        ),
    ]
示例#4
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('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=120, unique=True)),
                ('authy_id', models.CharField(max_length=250)),
                ('password', models.CharField(max_length=250)),
                ('is_confirmed', models.BooleanField(default=False)),
                ('phone_number_verified', models.BooleanField(default=False)),
                ('contact_number', models.CharField(max_length=250)),
                ('is_property_owner', models.BooleanField(default=False)),
                ('is_agent', models.BooleanField(default=False)),
                ('is_developer', models.BooleanField(default=False)),
                ('is_institute', models.BooleanField(default=False)),
                ('is_government', models.BooleanField(default=False)),
                ('is_customer', models.BooleanField(default=False)),
                ('is_hotelier', models.BooleanField(default=False)),
                ('is_valuer', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_supplier', models.BooleanField(default=False)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', accounts.managers.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='AgentInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_name', models.CharField(max_length=250)),
                ('cac_number', models.IntegerField()),
                ('office_address', models.CharField(max_length=250)),
                ('work_identity', cloudinary.models.CloudinaryField(max_length=255, verbose_name='image')),
                ('profile_picture', cloudinary.models.CloudinaryField(default='/avatar/customer.png', max_length=255, verbose_name='images')),
                ('latitude', models.FloatField()),
                ('longitude', models.FloatField()),
                ('location', django.contrib.gis.db.models.fields.PointField(geography=True, null=True, srid=4326)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='agent', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_name', models.CharField(max_length=250)),
                ('contact_address', models.CharField(blank=True, max_length=150)),
                ('notify', models.BooleanField(default=False)),
                ('profile_picture', cloudinary.models.CloudinaryField(default='/avatar/customer.png', max_length=255, verbose_name='images')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='customer', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='DeveloperInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_name', models.CharField(max_length=250)),
                ('cac_number', models.IntegerField()),
                ('office_address', models.CharField(max_length=250)),
                ('work_identity', cloudinary.models.CloudinaryField(max_length=255, verbose_name='image')),
                ('profile_picture', cloudinary.models.CloudinaryField(default='/avatar/customer.png', max_length=255, verbose_name='images')),
                ('latitude', models.FloatField()),
                ('longitude', models.FloatField()),
                ('location', django.contrib.gis.db.models.fields.PointField(geography=True, null=True, srid=4326)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='developer', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='GovernmentInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_name', models.CharField(max_length=250)),
                ('cac_number', models.IntegerField()),
                ('office_address', models.CharField(max_length=250)),
                ('work_identity', cloudinary.models.CloudinaryField(max_length=255, verbose_name='image')),
                ('profile_picture', cloudinary.models.CloudinaryField(default='/avatar/customer.png', max_length=255, verbose_name='images')),
                ('latitude', models.FloatField()),
                ('longitude', models.FloatField()),
                ('location', django.contrib.gis.db.models.fields.PointField(geography=True, null=True, srid=4326)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='government', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='HotelInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('hotel_name', models.CharField(max_length=25, unique=True)),
                ('cac_number', models.IntegerField(unique=True)),
                ('hotel_website', models.URLField(blank=True, unique=True)),
                ('address', models.CharField(max_length=250)),
                ('city', models.CharField(default='', max_length=250)),
                ('state', models.CharField(default='', max_length=250)),
                ('latitude', models.FloatField()),
                ('longitude', models.FloatField()),
                ('location', django.contrib.gis.db.models.fields.PointField(geography=True, null=True, srid=4326)),
                ('work_identity', cloudinary.models.CloudinaryField(max_length=255, verbose_name='image')),
                ('profile_picture', cloudinary.models.CloudinaryField(default='/avatar/customer.png', max_length=255, verbose_name='images')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='hotelier', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Institute',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('institute_name', models.CharField(max_length=250)),
                ('institute_address', models.CharField(max_length=250)),
                ('cac_number', models.CharField(max_length=250)),
                ('work_identity', cloudinary.models.CloudinaryField(max_length=255, verbose_name='images')),
                ('website', models.URLField(blank=True)),
                ('profile_picture', cloudinary.models.CloudinaryField(default='/avatar/customer.png', max_length=255, verbose_name='images')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='institute', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='PropertyOwnerInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_name', models.CharField(max_length=250)),
                ('contact_address', models.CharField(max_length=250)),
                ('profile_picture', cloudinary.models.CloudinaryField(default='/avatar/customer.png', max_length=255, verbose_name='images')),
                ('gender', models.CharField(max_length=250)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='owner', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Supplier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_name', models.CharField(max_length=250)),
                ('cac_number', models.IntegerField()),
                ('office_address', models.CharField(max_length=250)),
                ('work_identity', cloudinary.models.CloudinaryField(max_length=255, verbose_name='image')),
                ('profile_picture', cloudinary.models.CloudinaryField(default='/avatar/customer.png', max_length=255, verbose_name='images')),
                ('latitude', models.FloatField()),
                ('longitude', models.FloatField()),
                ('location', django.contrib.gis.db.models.fields.PointField(geography=True, null=True, srid=4326)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='supplier', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='UserPortFolio',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_name', models.CharField(max_length=250)),
                ('contact_address', models.CharField(max_length=250)),
                ('email', models.EmailField(max_length=254)),
                ('phone_number', models.CharField(max_length=250)),
                ('professional_summary', models.TextField()),
                ('education', models.TextField()),
                ('work_experince', models.TextField()),
                ('skill_set', models.TextField()),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Valuer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_name', models.CharField(max_length=250)),
                ('cac_number', models.IntegerField()),
                ('office_address', models.CharField(max_length=250)),
                ('work_identity', cloudinary.models.CloudinaryField(max_length=255, verbose_name='image')),
                ('profile_picture', cloudinary.models.CloudinaryField(default='/avatar/customer.png', max_length=255, verbose_name='images')),
                ('latitude', models.FloatField()),
                ('longitude', models.FloatField()),
                ('location', django.contrib.gis.db.models.fields.PointField(geography=True, null=True, srid=4326)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='valuer', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
示例#5
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='AwardsProject',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=60)),
                ('pic',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   null=True,
                                                   verbose_name='pic')),
                ('description', models.TextField()),
                ('link', models.URLField(max_length=300)),
            ],
        ),
        migrations.CreateModel(
            name='MoringaMerch',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name',
                 models.CharField(blank=True, max_length=60, null=True)),
                ('pic',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   null=True,
                                                   verbose_name='pic')),
                ('bio', models.TextField(blank=True, null=True)),
                ('email', models.EmailField(max_length=254, null=True)),
                ('user',
                 models.OneToOneField(
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        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=60, null=True)),
                ('last_name',
                 models.CharField(blank=True, max_length=60, null=True)),
                ('pic',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   null=True,
                                                   verbose_name='pic')),
                ('bio', models.TextField(blank=True, null=True)),
                ('likes', models.IntegerField(default=0)),
                ('email', models.EmailField(max_length=254, null=True)),
                ('phone_number',
                 phonenumber_field.modelfields.PhoneNumberField(max_length=128,
                                                                null=True,
                                                                region=None)),
                ('user',
                 models.OneToOneField(
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['first_name'],
            },
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=60)),
                ('pic',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   null=True,
                                                   verbose_name='pic')),
                ('description', models.TextField()),
                ('link', models.URLField(max_length=300)),
            ],
            options={
                'ordering': ['title'],
            },
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.TextField()),
                ('design_rating',
                 models.IntegerField(choices=[(1, '1'), (2, '2'), (3, '3'),
                                              (4, '4'), (5, '5'), (6, '6'),
                                              (7, '7'), (8, '8'), (9, '9'),
                                              (10, '10')],
                                     default=0)),
                ('usability_rating',
                 models.IntegerField(choices=[(1, '1'), (2, '2'), (3, '3'),
                                              (4, '4'), (5, '5'), (6, '6'),
                                              (7, '7'), (8, '8'), (9, '9'),
                                              (10, '10')],
                                     default=0)),
                ('content_rating',
                 models.IntegerField(choices=[(1, '1'), (2, '2'), (3, '3'),
                                              (4, '4'), (5, '5'), (6, '6'),
                                              (7, '7'), (8, '8'), (9, '9'),
                                              (10, '10')],
                                     default=0)),
                ('project',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='reviews',
                                   to='awards.Project')),
                ('user',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='reviews',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
示例#6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    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(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('name', models.CharField(blank=True, max_length=255)),
                ('email', models.EmailField(max_length=400)),
                ('profile_photo',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
                ('status', tinymce.models.HTMLField(blank=True, null=True)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Business',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('business_name', models.CharField(max_length=300)),
                ('description', tinymce.models.HTMLField()),
                ('location', models.TextField(max_length=400)),
                ('email_address', models.EmailField(max_length=400)),
            ],
        ),
        migrations.CreateModel(
            name='Neighbourhood',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=250)),
                ('description', tinymce.models.HTMLField()),
                ('location', models.TextField(max_length=400)),
                ('occupants_count', models.IntegerField(blank=True,
                                                        default=0)),
                ('healthcentre_no', models.IntegerField(blank=True)),
                ('police_no', models.IntegerField(blank=True)),
                ('admin',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='hood_hood',
                                   to=settings.AUTH_USER_MODEL)),
                ('business',
                 models.ManyToManyField(blank=True,
                                        related_name='hood_business',
                                        to='hood.Business')),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('avatar',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('hood_name',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='profile_name',
                                   to='hood.neighbourhood')),
                ('location',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='hood.neighbourhood')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('subject', models.TextField(max_length=400)),
                ('description', tinymce.models.HTMLField()),
                ('hood_post',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='hood_posts',
                                   to='hood.neighbourhood')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='hood_post_user',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Join',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('hood_name',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='hood_join',
                                   to='hood.neighbourhood')),
                ('location',
                 models.ForeignKey(default='',
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='hood_location_user',
                                   to='hood.neighbourhood')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='hood_join_user',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='business',
            name='hood',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='business_in_hood',
                to='hood.neighbourhood'),
        ),
        migrations.AddField(
            model_name='business',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='customuser',
            name='neighbourhood',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='hood_user',
                to='hood.neighbourhood'),
        ),
        migrations.AddField(
            model_name='customuser',
            name='user_permissions',
            field=models.ManyToManyField(
                blank=True,
                help_text='Specific permissions for this user.',
                related_name='user_set',
                related_query_name='user',
                to='auth.Permission',
                verbose_name='user permissions'),
        ),
    ]
示例#7
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)),
            ],
        ),
    ]
示例#8
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.CharField(max_length=256)),
            ],
        ),
        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,
                                                   verbose_name='image')),
                ('name',
                 models.CharField(blank=True, default='Post', max_length=144)),
                ('caption', models.TextField(blank=True)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('likes', models.IntegerField(default=0)),
                ('profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('profile_pic',
                 cloudinary.models.CloudinaryField(
                     max_length=255, verbose_name='profile_pic')),
                ('bio', models.TextField(blank=True)),
                ('followers',
                 models.ManyToManyField(blank=True,
                                        related_name='followers',
                                        to=settings.AUTH_USER_MODEL)),
                ('following',
                 models.ManyToManyField(blank=True,
                                        related_name='following',
                                        to=settings.AUTH_USER_MODEL)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='post',
            name='user_profile',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='instagram.UserProfile'),
        ),
        migrations.AddField(
            model_name='comment',
            name='post',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='instagram.Post'),
        ),
        migrations.AddField(
            model_name='comment',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
    ]
示例#9
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='Hood',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('image', cloudinary.models.CloudinaryField(max_length=255, verbose_name='image')),
                ('description', models.TextField(null=True)),
                ('residents', models.IntegerField(blank=True)),
                ('location', models.CharField(choices=[('Nyarutarama', 'Nyarutarama'), ('Kibagabaga', 'Kibagabaga'), ('Kimironko', 'Kimironko'), ('Kicukiro', 'Kicukiro'), ('Remera', 'Remera')], max_length=200)),
                ('police', models.IntegerField(blank=True, null=True)),
                ('hospital', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'ordering': ['-pk'],
            },
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('profile_picture', cloudinary.models.CloudinaryField(max_length=255, verbose_name='image')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='auth.user')),
                ('bio', models.CharField(max_length=500)),
                ('name', models.CharField(max_length=300)),
                ('location', models.CharField(blank=True, max_length=100, null=True)),
                ('hood', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='hood.hood')),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200, null=True)),
                ('description', models.TextField()),
                ('posted_on', models.DateTimeField(auto_now_add=True)),
                ('hood', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hood_poster', to='hood.hood')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='poster', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='hood',
            name='admin',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='neihborhood', to='hood.profile'),
        ),
        migrations.CreateModel(
            name='Business',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('address', models.CharField(max_length=500, null=True)),
                ('email', models.EmailField(max_length=300)),
                ('image', cloudinary.models.CloudinaryField(max_length=255, null=True, verbose_name='image')),
                ('description', models.TextField(blank=True)),
                ('hood', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='business', to='hood.hood')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='owner', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='HistoricalProduct',
            fields=[
                ('id',
                 models.IntegerField(auto_created=True,
                                     blank=True,
                                     db_index=True,
                                     verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
                ('price', models.FloatField(default=0)),
                ('sold_out', models.BooleanField(default=False)),
                ('history_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('history_change_reason',
                 models.CharField(max_length=100, null=True)),
                ('history_date', models.DateTimeField()),
                ('history_type',
                 models.CharField(choices=[('+', 'Created'), ('~', 'Changed'),
                                           ('-', 'Deleted')],
                                  max_length=1)),
                ('history_user',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='+',
                     to=settings.AUTH_USER_MODEL)),
                ('product_type',
                 models.ForeignKey(
                     blank=True,
                     db_constraint=False,
                     null=True,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     related_name='+',
                     to='type.Type')),
            ],
            options={
                'ordering': ('-history_date', '-history_id'),
                'verbose_name': 'historical product',
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.AddField(
            model_name='product',
            name='price',
            field=models.FloatField(default=0),
        ),
        migrations.AlterField(
            model_name='product',
            name='image',
            field=cloudinary.models.CloudinaryField(max_length=255,
                                                    null=True,
                                                    verbose_name='image'),
        ),
    ]
示例#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'),
        ),
    ]
示例#12
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Neighborhood',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=120)),
                ('location', models.CharField(blank=True, max_length=120)),
                ('hood_logo',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='gallery/')),
                ('occupants_count', models.PositiveIntegerField(default='0')),
                ('description', models.TextField()),
                ('health_department', models.IntegerField(blank=True,
                                                          null=True)),
                ('police_number', models.IntegerField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('photo',
                 cloudinary.models.CloudinaryField(default='default.jpeg',
                                                   max_length=255,
                                                   verbose_name='gallery/')),
                ('bio', models.CharField(max_length=300)),
                ('name', models.CharField(blank=True, max_length=120)),
                ('location', models.CharField(blank=True, max_length=120)),
                ('neighborhood',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='profile',
                                   to='neighbor.neighborhood')),
                ('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.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('title', models.CharField(max_length=120, null=True)),
                ('post', models.TextField()),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('hood',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='hood_post',
                                   to='neighbor.neighborhood')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='post_owner',
                                   to='neighbor.profile')),
            ],
        ),
        migrations.AddField(
            model_name='neighborhood',
            name='admin',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='hood',
                to='neighbor.profile'),
        ),
        migrations.CreateModel(
            name='Business',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('name', models.CharField(max_length=120)),
                ('photo',
                 cloudinary.models.CloudinaryField(default='default.jpeg',
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='gallery/')),
                ('email', models.EmailField(max_length=254)),
                ('description', models.TextField(blank=True)),
                ('neighborhood',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='business',
                                   to='neighbor.neighborhood')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='owner',
                                   to='neighbor.profile')),
            ],
        ),
    ]
示例#13
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('street_address', models.CharField(max_length=100)),
                ('apartment_address', models.CharField(max_length=100)),
                ('country',
                 django_countries.fields.CountryField(max_length=2)),
                ('zip', models.CharField(max_length=100)),
                ('address_type',
                 models.CharField(choices=[('B', 'Billing'),
                                           ('S', 'Shipping')],
                                  max_length=1)),
                ('default', models.BooleanField(default=False)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Addresses',
            },
        ),
        migrations.CreateModel(
            name='Coupon',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('code', models.CharField(max_length=15)),
                ('amount', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('price', models.FloatField()),
                ('discount_price', models.FloatField(blank=True, null=True)),
                ('category',
                 models.CharField(choices=[('S', 'T-Shirt'), ('SW', 'Hoodies'),
                                           ('O', 'Polo Shirt')],
                                  max_length=2)),
                ('label',
                 models.CharField(choices=[('P', 'primary'),
                                           ('S', 'secondary'),
                                           ('D', 'danger')],
                                  max_length=1)),
                ('slug', models.SlugField()),
                ('description', models.TextField()),
                ('size',
                 multiselectfield.db.fields.MultiSelectField(choices=[
                     ('XS', 'XS(36)'), ('S', 'S(38)'), ('M', 'M(40)'),
                     ('L', 'L(42)'), ('XL', 'XL(44)'), ('XXL', 'XXL(46)'),
                     ('XXXL', 'XXXL(48)')
                 ],
                                                             max_length=20)),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('ref_code',
                 models.CharField(blank=True, max_length=20, null=True)),
                ('start_date', models.DateTimeField(auto_now_add=True)),
                ('order_date', models.DateTimeField()),
                ('ordered', models.BooleanField(default=False)),
                ('being_delivered', models.BooleanField(default=False)),
                ('received', models.BooleanField(default=False)),
                ('refund_requested', models.BooleanField(default=False)),
                ('refund_granted', models.BooleanField(default=False)),
                ('order_discount_amount', models.FloatField()),
                ('order_total', models.FloatField()),
                ('billing_address',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='billing_address',
                     to='core.Address')),
                ('coupon',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='core.Coupon')),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('stripe_customer_id',
                 models.CharField(blank=True, max_length=50, null=True)),
                ('one_click_purchasing', models.BooleanField(default=False)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Refund',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('reason', models.TextField()),
                ('accepted', models.BooleanField(default=False)),
                ('email', models.EmailField(max_length=254)),
                ('order',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Order')),
            ],
        ),
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('stripe_charge_id', models.CharField(max_length=50)),
                ('amount', models.FloatField()),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('user',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='OrderItem',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('ordered', models.BooleanField(default=False)),
                ('quantity', models.IntegerField(default=1)),
                ('ordered_size', models.CharField(max_length=4)),
                ('ordereditem_title', models.CharField(max_length=100)),
                ('ordereditem_price', models.FloatField()),
                ('ordereditem_totalprice', models.FloatField()),
                ('item',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Item')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='order',
            name='items',
            field=models.ManyToManyField(to='core.OrderItem'),
        ),
        migrations.AddField(
            model_name='order',
            name='payment',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='core.Payment'),
        ),
        migrations.AddField(
            model_name='order',
            name='shipping_address',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name='shipping_address',
                to='core.Address'),
        ),
        migrations.AddField(
            model_name='order',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
    ]
示例#14
0
class Migration(migrations.Migration):

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
        ('HMS', '0005_auto_20180421_1236'),
    ]

    operations = [
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('user_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   primary_key=True,
                                   related_name='reviews',
                                   serialize=False,
                                   to=settings.AUTH_USER_MODEL)),
                ('rating', models.IntegerField()),
                ('description', models.CharField(max_length=1000)),
                ('date', models.DateField(default=django.utils.timezone.now)),
            ],
            options={
                'verbose_name': 'Rating',
                'verbose_name_plural': 'Ratings',
            },
        ),
        migrations.AlterModelOptions(
            name='image',
            options={
                'verbose_name': 'Image',
                'verbose_name_plural': 'Images'
            },
        ),
        migrations.AddField(
            model_name='image',
            name='image',
            field=cloudinary.models.CloudinaryField(blank=True,
                                                    max_length=255,
                                                    verbose_name='room image'),
        ),
        migrations.AddField(
            model_name='image',
            name='room_type',
            field=models.CharField(
                choices=[('EXECUTIVE', 'Executive'), ('DELUXE', 'Deluxe'),
                         ('PRESIDENTIAL', 'Presidential'),
                         ('BUSINESS', 'Business')],
                default='Executive',
                help_text=
                'Enter the room type for which you want to add an image',
                max_length=100),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='room',
            name='bar',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='room',
            name='electronic_safe',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='room',
            name='gym',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='room',
            name='pick_up',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='room',
            name='restaurant',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='room',
            name='room_service',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='room',
            name='spa',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='room',
            name='swimming_pool',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='room',
            name='wifi',
            field=models.BooleanField(default=False),
        ),
        migrations.AlterField(
            model_name='booking',
            name='checkout_time',
            field=models.DateTimeField(blank=True),
        ),
        migrations.AlterField(
            model_name='profile',
            name='user_type',
            field=models.IntegerField(choices=[('CUSTOMER',
                                                'Customer'), ('ADMIN',
                                                              'Admin')]),
        ),
        migrations.AlterField(
            model_name='room',
            name='room_type',
            field=models.CharField(choices=[('EXECUTIVE', 'Executive'),
                                            ('DELUXE', 'Deluxe'),
                                            ('PRESIDENTIAL', 'Presidential'),
                                            ('BUSINESS', 'Business')],
                                   max_length=100),
        ),
        migrations.AlterUniqueTogether(
            name='image',
            unique_together=set(),
        ),
        migrations.DeleteModel(name='RoomType', ),
        migrations.RemoveField(
            model_name='image',
            name='room_number',
        ),
        migrations.RemoveField(
            model_name='image',
            name='url',
        ),
    ]
示例#15
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='NewsLetterRecipients',
            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='Project',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=25, null=True)),
                ('image', cloudinary.models.CloudinaryField(max_length=255, null=True, verbose_name='image')),
                ('link', models.URLField(blank=True, max_length=1000, null=True)),
                ('body', models.TextField(blank=True, max_length=300, null=True)),
                ('design', models.IntegerField(default=0)),
                ('usability', models.IntegerField(default=0)),
                ('content', models.IntegerField(default=0)),
                ('slug', models.SlugField(blank=True, max_length=200, null=True)),
                ('date', models.DateField(auto_now=True)),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('design', models.PositiveIntegerField(default=0, validators=[django.core.validators.MaxValueValidator(10)])),
                ('usability', models.PositiveIntegerField(default=0, validators=[django.core.validators.MaxValueValidator(10)])),
                ('content', models.PositiveIntegerField(default=0, validators=[django.core.validators.MaxValueValidator(10)])),
                ('review', models.TextField(blank=True, max_length=750, null=True)),
                ('review_date', models.DateField(auto_now_add=True)),
                ('rating', models.FloatField(validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(10)])),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='awwards.project')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user_image', models.URLField(blank=True, default='https://res.cloudinary.com/mairura/image/upload/w_1000,c_fill,ar_1:1,g_auto,r_max,bo_5px_solid_red,b_rgb:262c35/v1605442723/p3t7keywhkmswljeuu9x.jpg', null=True)),
                ('bio', tinymce.models.HTMLField(blank=True, max_length=150, null=True)),
                ('contact', models.CharField(default=1234567800, max_length=10)),
                ('user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comments', models.TextField(max_length=400)),
                ('pro_id', models.IntegerField(default=0)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
示例#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.CharField(max_length=300)),
            ],
        ),
        migrations.CreateModel(
            name='Following',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('user',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='InstaPhotos',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('image',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('bio', models.TextField(blank=True, null=True)),
                ('dp',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
                ('following', models.ManyToManyField(to='people.Following')),
                ('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,
                                                   null=True,
                                                   verbose_name='image')),
                ('name', models.CharField(max_length=30)),
                ('caption', models.TextField()),
                ('likes', models.IntegerField(blank=True, null=True)),
                ('pub_date', models.DateTimeField(auto_now_add=True,
                                                  null=True)),
                ('comments', models.ManyToManyField(to='people.Comment')),
                ('profile',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='people.profile')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('awsomeProject', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('commentText', models.TextField()),
                ('created', models.DateTimeField(default=django.utils.timezone.now, editable=False)),
            ],
        ),
        migrations.CreateModel(
            name='DeveloperGame',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True)),
                ('url', models.URLField()),
                ('price', models.FloatField()),
                ('description', models.TextField(default=b'', max_length=300)),
                ('created', models.DateField(default=django.utils.timezone.now, editable=False)),
                ('category', models.CharField(choices=[(b'Action', b'Action'), (b'Adventure', b'Adventure'), (b'Sports', b'Sports'), (b'Strategy', b'Strategy'), (b'Puzzle', b'Puzzle')], default=b'Action', max_length=20)),
                ('image', cloudinary.models.CloudinaryField(max_length=255, verbose_name=b'image')),
            ],
        ),
        migrations.CreateModel(
            name='Gameplay',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.FloatField()),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='awsomeProject.Game')),
            ],
        ),
        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=b'image')),
            ],
        ),
        migrations.CreateModel(
            name='PlayerItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('itemName', models.CharField(max_length=255)),
                ('gameplay', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='awsomeProject.Gameplay')),
            ],
        ),
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rating', models.IntegerField()),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='awsomeProject.Game')),
            ],
        ),
        migrations.CreateModel(
            name='Scores',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.FloatField()),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='awsomeProject.Game')),
            ],
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(default=django.utils.timezone.now, editable=False)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='awsomeProject.Game')),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('isDeveloper', models.BooleanField()),
                ('key', models.CharField(default=b'', max_length=300)),
            ],
        ),
        migrations.AddField(
            model_name='transaction',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='scores',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='rating',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='gameplay',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='developergame',
            name='game',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='awsomeProject.Game'),
        ),
        migrations.AddField(
            model_name='developergame',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='comment',
            name='game',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='awsomeProject.Game'),
        ),
        migrations.AddField(
            model_name='comment',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
示例#18
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Offering',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('offering_start_date', models.DateField()),
                ('offering_end_date', models.DateField()),
                ('customer_name', models.CharField(max_length=100)),
                ('customer_email',
                 models.EmailField(blank=True, max_length=70, null=True)),
                ('phone_number',
                 phonenumber_field.modelfields.PhoneNumberField(
                     max_length=128)),
                ('is_approved', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='OfferingStatus',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('slug', models.SlugField(verbose_name='Slug')),
            ],
            options={
                'abstract': False,
                'base_manager_name': '_plain_manager',
            },
            bases=(django_libs.models_mixins.TranslationModelMixin,
                   models.Model),
            managers=[
                ('objects', django.db.models.manager.Manager()),
                ('_plain_manager', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='OfferingStatusTranslation',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=128,
                                          verbose_name='Name')),
                ('language_code', models.CharField(db_index=True,
                                                   max_length=15)),
                ('master',
                 models.ForeignKey(editable=False,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='translations',
                                   to='products.OfferingStatus')),
            ],
            options={
                'managed': True,
                'abstract': False,
                'db_table': 'products_offeringstatus_translation',
                'db_tablespace': '',
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('price', models.IntegerField()),
                ('quatity', models.IntegerField()),
                ('owner', models.CharField(max_length=100)),
                ('description', models.TextField(blank=True, default=b'')),
                ('slug', models.SlugField(blank=True, unique=True)),
                ('name', models.CharField(max_length=100)),
                ('address', models.CharField(default=b'', max_length=100)),
                ('date_created', models.DateField(auto_now_add=True)),
                ('date_last_modified', models.DateField(auto_now=True)),
                ('commission',
                 models.CharField(max_length=10,
                                  validators=[products.models.valid_pct])),
                ('is_available', models.BooleanField(default=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ProductPhoto',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 cloudinary.models.CloudinaryField(
                     blank=True,
                     default=
                     b'http://res.cloudinary.com/theeventdiary/image/upload/v1483614044/lg_m8sc17.jpg',
                     max_length=255)),
                ('product',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='products.Product')),
                ('user',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='offering',
            name='product',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='products.Product'),
        ),
        migrations.AddField(
            model_name='offering',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterUniqueTogether(
            name='offeringstatustranslation',
            unique_together=set([('language_code', 'master')]),
        ),
    ]
示例#19
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('first_name', models.CharField(blank=True, max_length=200, null=True)),
                ('last_name', models.CharField(blank=True, max_length=200, null=True)),
                ('phone_number', models.CharField(blank=True, max_length=12, null=True, unique=True)),
                ('whatsapp_number', models.CharField(blank=True, max_length=12, null=True, unique=True)),
                ('is_merchant', models.BooleanField(default=True)),
                ('business_name', models.CharField(blank=True, max_length=200, null=True, unique=True)),
                ('business_description', models.TextField(max_length=300)),
                ('address', models.CharField(blank=True, max_length=200, null=True)),
                ('confirmed_payment', models.BooleanField(default=False)),
                ('date_created', models.DateField(default=django.utils.timezone.now)),
                ('subscription_expired', models.BooleanField(default=False)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        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, unique=True)),
                ('details', models.CharField(default='Default', max_length=200)),
                ('image', cloudinary.models.CloudinaryField(max_length=255, verbose_name='image')),
                ('date_created', models.DateTimeField(default=django.utils.timezone.now)),
            ],
            options={
                'ordering': ['-date_created'],
            },
        ),
        migrations.CreateModel(
            name='School',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=200, null=True, unique=True)),
                ('alias', models.CharField(blank=True, max_length=200, unique=True)),
                ('state', models.CharField(blank=True, max_length=200, null=True)),
                ('hotspots', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(blank=True, max_length=200), default=list, size=50)),
            ],
        ),
        migrations.CreateModel(
            name='SubCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('date_created', models.DateTimeField(blank=True, default=django.utils.timezone.now)),
                ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Category')),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            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')),
                ('dropoff_point', models.CharField(blank=True, max_length=100, null=True)),
                ('name', models.CharField(max_length=70)),
                ('description', models.TextField(max_length=250)),
                ('price', models.FloatField()),
                ('views', models.IntegerField(default=0)),
                ('published_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.SubCategory')),
                ('merchant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('school', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.School')),
            ],
            options={
                'ordering': ['-published_date'],
            },
        ),
        migrations.AddField(
            model_name='user',
            name='school',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.School'),
        ),
        migrations.AddField(
            model_name='user',
            name='user_permissions',
            field=models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions'),
        ),
    ]
示例#20
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    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(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='email address')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='BlogPost',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=500)),
                ('body', models.CharField(blank=True, max_length=5000)),
                ('block_quote', models.CharField(max_length=1000, null=True)),
                ('image',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
                ('slug', models.CharField(blank=True,
                                          max_length=200,
                                          null=True)),
                ('date_created',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('last_updated',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('author',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('name',
                 models.CharField(max_length=500,
                                  primary_key=True,
                                  serialize=False,
                                  unique=True)),
            ],
            options={
                'verbose_name_plural': 'Categories',
            },
        ),
        migrations.CreateModel(
            name='Cause',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=2000)),
                ('image',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
                ('description', models.TextField(blank=True, max_length=5000)),
                ('hospital_address',
                 models.CharField(max_length=2000, null=True)),
                ('reference_code', models.CharField(max_length=30, null=True)),
                ('target', models.DecimalField(decimal_places=2,
                                               max_digits=8)),
                ('donated',
                 models.DecimalField(decimal_places=2,
                                     default=0.0,
                                     max_digits=8)),
                ('approved', models.BooleanField(default=False)),
                ('donor_count', models.IntegerField(default=0)),
                ('date_created',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('last_updated',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('user',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='DonationTransactionHistory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('amount_donated',
                 models.DecimalField(decimal_places=2,
                                     default=0.0,
                                     max_digits=8)),
                ('donor_name',
                 models.CharField(blank=True, max_length=500, null=True)),
                ('date_created',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('last_updated',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('cause',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.cause')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('body', models.CharField(blank=True, max_length=1000)),
                ('author',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('blog_post',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='comments',
                                   to='app.blogpost')),
            ],
        ),
        migrations.AddField(
            model_name='blogpost',
            name='category',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='app.category'),
        ),
    ]
示例#21
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, unique=True)),
                ('url', models.URLField(unique=True)),
                ('price', models.DecimalField(decimal_places=2, default=0, max_digits=8)),
                ('logo', cloudinary.models.CloudinaryField(blank=True, max_length=255, null=True, verbose_name='logo')),
                ('banner', cloudinary.models.CloudinaryField(blank=True, max_length=255, null=True, verbose_name='banner')),
                ('description', models.TextField(blank=True, max_length=1000)),
            ],
        ),
        migrations.CreateModel(
            name='GameReview',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('review_text', models.TextField(blank=True, max_length=500)),
                ('review_star', models.IntegerField(default=0)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gamestore.Game')),
            ],
        ),
        migrations.CreateModel(
            name='GameSale',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time_of_purchase', models.DateTimeField(auto_now_add=True)),
                ('ref', models.IntegerField()),
                ('pid', models.CharField(max_length=20)),
                ('price_paid', models.DecimalField(decimal_places=2, default=0, max_digits=8)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gamestore.Game')),
            ],
        ),
        migrations.CreateModel(
            name='PurchasedGame',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('game_state', models.CharField(blank=True, default='', max_length=10000)),
                ('high_score', models.IntegerField(default=0)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gamestore.Game')),
            ],
        ),
        migrations.CreateModel(
            name='RegUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('developer', models.BooleanField(default=False)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, unique=True)),
            ],
        ),
        migrations.AddField(
            model_name='purchasedgame',
            name='player',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gamestore.RegUser'),
        ),
        migrations.AddField(
            model_name='gamereview',
            name='reviewer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gamestore.RegUser'),
        ),
        migrations.AddField(
            model_name='game',
            name='developer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gamestore.RegUser'),
        ),
        migrations.AddField(
            model_name='game',
            name='tags',
            field=models.ManyToManyField(blank=True, to='gamestore.Tag'),
        ),
    ]
示例#22
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='AddressSaved',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('street', models.CharField(max_length=100)),
                ('number', models.CharField(max_length=100)),
                ('district', models.CharField(max_length=100)),
                ('floor',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=100,
                                  null=True)),
                ('reference',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=100,
                                  null=True)),
                ('location',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=100,
                                  null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Client',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('phone',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('photo', models.CharField(max_length=4000)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('description', models.CharField(max_length=150)),
                ('phone', models.CharField(max_length=50)),
                ('address', models.CharField(max_length=50)),
                ('available_now',
                 models.CharField(choices=[('SI', 'Si'), ('NO', 'No')],
                                  default='Si',
                                  max_length=2)),
                ('photo',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('limits', models.CharField(max_length=1000)),
                ('account_debit', models.FloatField()),
                ('creation_date', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='CompanyCategory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('description', models.CharField(max_length=150)),
                ('photo', models.CharField(max_length=3000)),
            ],
        ),
        migrations.CreateModel(
            name='DeliveryMethod',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('description', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='PaymentMethod',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('description', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='ProductCategories',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('description', models.CharField(max_length=250)),
                ('company',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Company')),
            ],
        ),
        migrations.CreateModel(
            name='State',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('description', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Products',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('description', models.CharField(max_length=250)),
                ('price', models.IntegerField()),
                ('is_available',
                 models.CharField(choices=[('SI', 'Si'), ('NO', 'No')],
                                  default='Si',
                                  max_length=2)),
                ('photo',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('category',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.ProductCategories')),
                ('id_company',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Company')),
            ],
        ),
        migrations.CreateModel(
            name='PaymentService',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('payment_date', models.DateField(auto_now_add=True)),
                ('payment_status', models.CharField(max_length=45)),
                ('mount', models.FloatField()),
                ('transaction_date', models.DateField(null=True)),
                ('description', models.CharField(max_length=45)),
                ('period', models.CharField(max_length=45)),
                ('company',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Company')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('retry_in_local', models.BooleanField(default=False)),
                ('total', models.IntegerField()),
                ('address',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='core.AddressSaved')),
                ('client',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Client')),
                ('id_company',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Company')),
                ('payment_method',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.PaymentMethod')),
                ('state',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.State')),
            ],
        ),
        migrations.CreateModel(
            name='MeLiTransaction',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('preference_id', models.CharField(max_length=100)),
                ('payment_id', models.CharField(max_length=45)),
                ('payment_status', models.CharField(max_length=45)),
                ('payment_status_detail', models.CharField(max_length=45)),
                ('merchant_order_id', models.CharField(max_length=45)),
                ('processing_mode', models.CharField(max_length=45)),
                ('creation_date', models.DateTimeField(auto_now_add=True)),
                ('payment_service',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.PaymentService')),
            ],
        ),
        migrations.CreateModel(
            name='MeliLinks',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('link', models.CharField(max_length=1024)),
                ('creation_date', models.DateTimeField(auto_now_add=True)),
                ('order',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Order')),
            ],
        ),
        migrations.CreateModel(
            name='DetailOrder',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('quantity', models.IntegerField()),
                ('order',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Order')),
                ('product',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Products')),
            ],
        ),
        migrations.AddField(
            model_name='company',
            name='category',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='core.CompanyCategory'),
        ),
        migrations.AddField(
            model_name='company',
            name='delivery_method',
            field=models.ManyToManyField(to='core.DeliveryMethod'),
        ),
        migrations.AddField(
            model_name='company',
            name='id_user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='company',
            name='payment_method',
            field=models.ManyToManyField(to='core.PaymentMethod'),
        ),
        migrations.AddField(
            model_name='addresssaved',
            name='client',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='core.Client'),
        ),
    ]
示例#23
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('project_image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('description', models.TextField()),
                ('live_link', models.CharField(max_length=100)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='project',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('design', models.IntegerField()),
                ('usability', models.IntegerField()),
                ('content', models.IntegerField()),
                ('project',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='projectrating',
                                   to='api.Project')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='rating',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('profile_picture',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('profile_bio', models.TextField()),
                ('contact_info', models.EmailField(max_length=254)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
示例#24
0
class Migration(migrations.Migration):

    dependencies = [
        ('buyersguide', '0034_auto_20200113_1514'),
    ]

    operations = [
        migrations.CreateModel(
            name='BaseProduct',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('draft',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'When checked, this product will only show for CMS-authenticated users'
                 )),
                ('adult_content',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'When checked, product thumbnail will appear blurred as well as have an 18+ badge on it'
                 )),
                ('review_date',
                 models.DateField(help_text='Review date of this product')),
                ('name',
                 models.CharField(blank=True,
                                  help_text='Name of Product',
                                  max_length=100)),
                ('slug',
                 models.CharField(blank=True,
                                  default=None,
                                  editable=False,
                                  help_text='slug used in urls',
                                  max_length=256)),
                ('company',
                 models.CharField(blank=True,
                                  help_text='Name of Company',
                                  max_length=100)),
                ('blurb',
                 models.TextField(blank=True,
                                  help_text='Description of the product',
                                  max_length=5000)),
                ('url',
                 models.URLField(blank=True,
                                 help_text='Link to this product page',
                                 max_length=2048)),
                ('price',
                 models.CharField(blank=True,
                                  help_text='Price',
                                  max_length=100)),
                ('image',
                 models.FileField(blank=True,
                                  help_text='Image representing this product',
                                  max_length=2048,
                                  upload_to=networkapi.buyersguide.pagemodels.
                                  get_product_image_upload_path.
                                  get_product_image_upload_path)),
                ('cloudinary_image',
                 cloudinary.models.CloudinaryField(
                     blank=True,
                     help_text=
                     'Image representing this product - hosted on Cloudinary',
                     max_length=255,
                     verbose_name='image')),
                ('meets_minimum_security_standards',
                 models.BooleanField(
                     help_text=
                     'Does this product meet minimum security standards?',
                     null=True)),
                ('uses_encryption',
                 networkapi.buyersguide.fields.ExtendedYesNoField(
                     help_text='Does the product use encryption?')),
                ('uses_encryption_helptext',
                 models.TextField(blank=True, max_length=5000)),
                ('security_updates',
                 networkapi.buyersguide.fields.ExtendedYesNoField(
                     help_text='Security updates?')),
                ('security_updates_helptext',
                 models.TextField(blank=True, max_length=5000)),
                ('strong_password',
                 networkapi.buyersguide.fields.ExtendedYesNoField()),
                ('strong_password_helptext',
                 models.TextField(blank=True, max_length=5000)),
                ('manage_vulnerabilities',
                 networkapi.buyersguide.fields.ExtendedYesNoField(
                     help_text='Manages security vulnerabilities?')),
                ('manage_vulnerabilities_helptext',
                 models.TextField(blank=True, max_length=5000)),
                ('privacy_policy',
                 networkapi.buyersguide.fields.ExtendedYesNoField(
                     help_text='Does this product have a privacy policy?')),
                ('privacy_policy_helptext',
                 models.TextField(blank=True, max_length=5000)),
                ('share_data',
                 models.BooleanField(
                     help_text=
                     'Does the maker share data with other companies?',
                     null=True)),
                ('share_data_helptext',
                 models.TextField(blank=True, max_length=5000)),
                ('how_does_it_share',
                 models.CharField(
                     blank=True,
                     help_text='How does this product handle data?',
                     max_length=5000)),
                ('user_friendly_privacy_policy',
                 networkapi.buyersguide.fields.ExtendedYesNoField(
                     help_text=
                     'Does this product have a user-friendly privacy policy?')
                 ),
                ('user_friendly_privacy_policy_helptext',
                 models.TextField(blank=True, max_length=5000)),
                ('worst_case',
                 models.CharField(
                     blank=True,
                     help_text=
                     "What's the worst thing that could happen by using this product?",
                     max_length=5000)),
                ('phone_number',
                 models.CharField(blank=True,
                                  help_text='Phone Number',
                                  max_length=100)),
                ('live_chat',
                 models.CharField(blank=True,
                                  help_text='Live Chat',
                                  max_length=100)),
                ('email',
                 models.CharField(blank=True,
                                  help_text='Email',
                                  max_length=100)),
                ('twitter',
                 models.CharField(blank=True,
                                  help_text='Twitter username',
                                  max_length=100)),
                ('product_category',
                 models.ManyToManyField(
                     blank=True,
                     related_name='pniproduct',
                     to='buyersguide.BuyersGuideProductCategory')),
                ('related_products',
                 models.ManyToManyField(blank=True,
                                        related_name='related_pniproduct',
                                        to='buyersguide.BaseProduct')),
                ('updates',
                 models.ManyToManyField(blank=True,
                                        related_name='pniproduct',
                                        to='buyersguide.Update')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='BaseProductPrivacyPolicyLink',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('sort_order',
                 models.IntegerField(blank=True, editable=False, null=True)),
                ('label',
                 models.CharField(
                     help_text='Label for this link on the product page',
                     max_length=500)),
                ('url',
                 models.URLField(blank=True,
                                 help_text='Privacy policy URL',
                                 max_length=2048)),
                ('product',
                 modelcluster.fields.ParentalKey(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='privacy_policy_links',
                     to='buyersguide.BaseProduct')),
            ],
            options={
                'verbose_name': 'Buyers Guide Product Privacy Policy link',
                'verbose_name_plural':
                'Buyers Guide Product Privacy Policy links',
            },
        ),
        migrations.CreateModel(
            name='GeneralProduct',
            fields=[
                ('baseproduct_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='buyersguide.BaseProduct')),
                ('camera_device',
                 networkapi.buyersguide.fields.ExtendedYesNoField(
                     help_text='Does this device have or access a camera?')),
                ('camera_app',
                 networkapi.buyersguide.fields.ExtendedYesNoField(
                     help_text='Does the app have or access a camera?')),
                ('microphone_device',
                 networkapi.buyersguide.fields.ExtendedYesNoField(
                     help_text='Does this Device have or access a microphone?')
                 ),
                ('microphone_app',
                 networkapi.buyersguide.fields.ExtendedYesNoField(
                     help_text='Does this app have or access a microphone?')),
                ('location_device',
                 networkapi.buyersguide.fields.ExtendedYesNoField(
                     help_text='Does this product access your location?')),
                ('location_app',
                 networkapi.buyersguide.fields.ExtendedYesNoField(
                     help_text='Does this app access your location?')),
                ('delete_data',
                 models.BooleanField(
                     help_text='Can you request data be deleted?', null=True)),
                ('delete_data_helptext',
                 models.TextField(blank=True, max_length=5000)),
                ('parental_controls',
                 networkapi.buyersguide.fields.ExtendedYesNoField(
                     help_text='Are there rules for children?', null=True)),
                ('child_rules_helptext',
                 models.TextField(blank=True, max_length=5000)),
                ('collects_biometrics',
                 networkapi.buyersguide.fields.ExtendedYesNoField(
                     help_text='Does this product collect biometric data?')),
                ('collects_biometrics_helptext',
                 models.TextField(blank=True, max_length=5000)),
            ],
            options={
                'abstract': False,
            },
            bases=('buyersguide.baseproduct', ),
        ),
        migrations.CreateModel(
            name='SoftwareProduct',
            fields=[
                ('baseproduct_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='buyersguide.BaseProduct')),
            ],
            options={
                'abstract': False,
            },
            bases=('buyersguide.baseproduct', ),
        ),
    ]
示例#25
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',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('bio', models.TextField()),
                ('location', models.CharField(max_length=60)),
                ('email', models.EmailField(max_length=254)),
                ('portfolio_link', models.URLField()),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
                ('screenshot',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('description', models.TextField()),
                ('link', models.URLField()),
                ('post_date', models.DateTimeField(auto_now_add=True,
                                                   null=True)),
                ('design_score', models.IntegerField(default=0)),
                ('usability_score', models.IntegerField(default=0)),
                ('content_score', models.IntegerField(default=0)),
                ('average_design', models.FloatField(default=0)),
                ('average_usability', models.FloatField(default=0)),
                ('average_content', models.FloatField(default=0)),
                ('average_score', models.FloatField(default=0)),
                ('profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='awardsapp.profile')),
                ('voters',
                 models.ManyToManyField(related_name='votes',
                                        to='awardsapp.Profile')),
            ],
        ),
    ]
示例#26
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Booking',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('start_date', models.DateField()),
                ('end_date', models.DateField()),
                ('price', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('email', models.EmailField(max_length=254)),
                ('password', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Images',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('url',
                 cloudinary.models.CloudinaryField(
                     blank=True,
                     max_length=255,
                     verbose_name='profile picture')),
            ],
        ),
        migrations.CreateModel(
            name='profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('profile_pic',
                 cloudinary.models.CloudinaryField(
                     blank=True,
                     max_length=255,
                     verbose_name='profile picture')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('review',
                 models.CharField(help_text='Enter comments', max_length=100)),
                ('rating', models.PositiveIntegerField()),
                ('user_id',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Room',
            fields=[
                ('room_no', models.AutoField(primary_key=True,
                                             serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='Type',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name',
                 models.CharField(help_text='Enter name of the room',
                                  max_length=60)),
                ('capacity', models.IntegerField()),
                ('price',
                 models.IntegerField(
                     help_text='Enter price for per day stay')),
                ('wifi_service', models.BooleanField()),
                ('breakfast_service', models.BooleanField()),
                ('spa_service', models.BooleanField()),
                ('room_service', models.BooleanField()),
                ('minibar_service', models.BooleanField()),
                ('gym_service', models.BooleanField()),
                ('pool_service', models.BooleanField()),
            ],
            options={
                'ordering': ['id'],
            },
        ),
        migrations.AddField(
            model_name='room',
            name='type',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='megamaninn.Type'),
        ),
        migrations.AddField(
            model_name='images',
            name='room_type_id',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='megamaninn.Type'),
        ),
        migrations.AddField(
            model_name='booking',
            name='room_no',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='megamaninn.Room'),
        ),
    ]
示例#27
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Anuncio',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('creacion',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('modificacion',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('publicacion', models.DateTimeField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='BitacoraContactos',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('consulta',
                 models.DateTimeField(default=django.utils.timezone.now)),
            ],
            options={
                'verbose_name': 'BitacoraContacto',
                'verbose_name_plural': 'BitacoraCotactos',
            },
        ),
        migrations.CreateModel(
            name='Cliente',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
                ('apellidos', models.CharField(max_length=50)),
                ('email', models.EmailField(max_length=254)),
                ('movil', models.IntegerField()),
                ('fijo', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'verbose_name': 'Cliente',
                'verbose_name_plural': 'Clientes',
            },
        ),
        migrations.CreateModel(
            name='Comuna',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
            ],
            options={
                'ordering': ['nombre'],
            },
        ),
        migrations.CreateModel(
            name='Direccion',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('calle', models.CharField(max_length=150)),
                ('numero', models.CharField(max_length=7)),
                ('detalle',
                 models.CharField(blank=True, max_length=255, null=True)),
                ('codigo_postal', models.IntegerField(blank=True, null=True)),
                ('comuna',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='publicacion.Comuna')),
            ],
        ),
        migrations.CreateModel(
            name='Galeria',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('contenido',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
            ],
        ),
        migrations.CreateModel(
            name='Inmueble',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Propietario',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
                ('apellidos', models.CharField(max_length=50)),
                ('rut', models.IntegerField(unique=True)),
                ('dv', models.CharField(max_length=1)),
                ('movil', models.IntegerField()),
                ('fijo', models.IntegerField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Provincia',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
            ],
            options={
                'ordering': ['nombre'],
            },
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
            ],
            options={
                'ordering': ['nombre'],
            },
        ),
        migrations.CreateModel(
            name='Requisito',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('descripcion', models.CharField(max_length=50)),
                ('cantidad', models.IntegerField()),
                ('obligatorio', models.BooleanField(default=True)),
                ('inmueble',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='publicacion.Inmueble')),
            ],
        ),
        migrations.CreateModel(
            name='Sector',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
                ('comuna',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='publicacion.Comuna')),
                ('provincia',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='publicacion.Provincia')),
                ('region',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='publicacion.Region')),
            ],
        ),
        migrations.CreateModel(
            name='TipoContenido',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('descripcion', models.CharField(max_length=25)),
            ],
        ),
        migrations.CreateModel(
            name='TipoInmueble',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('descripcion', models.CharField(max_length=50)),
            ],
        ),
        migrations.AddField(
            model_name='provincia',
            name='region',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Region'),
        ),
        migrations.AddField(
            model_name='inmueble',
            name='propietario',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Propietario'),
        ),
        migrations.AddField(
            model_name='inmueble',
            name='tipo_inmueble',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.TipoInmueble'),
        ),
        migrations.AddField(
            model_name='galeria',
            name='inmueble',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Inmueble'),
        ),
        migrations.AddField(
            model_name='galeria',
            name='tipo_contenido',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.TipoContenido'),
        ),
        migrations.AddField(
            model_name='direccion',
            name='propietario',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Propietario'),
        ),
        migrations.AddField(
            model_name='direccion',
            name='provincia',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Provincia'),
        ),
        migrations.AddField(
            model_name='direccion',
            name='region',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Region'),
        ),
        migrations.AddField(
            model_name='direccion',
            name='sector',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Sector'),
        ),
        migrations.AddField(
            model_name='comuna',
            name='provincia',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Provincia'),
        ),
        migrations.AddField(
            model_name='bitacoracontactos',
            name='cliente',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Cliente'),
        ),
        migrations.AddField(
            model_name='bitacoracontactos',
            name='inmueble',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Inmueble'),
        ),
        migrations.AddField(
            model_name='anuncio',
            name='inmueble',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Inmueble'),
        ),
    ]
示例#28
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('details', models.TextField()),
                ('link', models.CharField(max_length=100)),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('user_project_id', models.IntegerField(default=0)),
                ('design',
                 models.IntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3),
                                              (4, 4), (5, 5), (6, 6), (7, 7),
                                              (8, 8), (9, 9), (10, 10)],
                                     default=0)),
                ('usability',
                 models.IntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3),
                                              (4, 4), (5, 5), (6, 6), (7, 7),
                                              (8, 8), (9, 9), (10, 10)],
                                     default=0)),
                ('creativity',
                 models.IntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3),
                                              (4, 4), (5, 5), (6, 6), (7, 7),
                                              (8, 8), (9, 9), (10, 10)],
                                     default=0)),
                ('content',
                 models.IntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3),
                                              (4, 4), (5, 5), (6, 6), (7, 7),
                                              (8, 8), (9, 9), (10, 10)],
                                     default=0)),
                ('vote_submissions', models.IntegerField(default=0)),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'projects',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Rate',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('design',
                 models.IntegerField(validators=[
                     django.core.validators.MinValueValidator(1),
                     django.core.validators.MaxValueValidator(10)
                 ])),
                ('usability',
                 models.IntegerField(
                     null=True,
                     validators=[
                         django.core.validators.MinValueValidator(1),
                         django.core.validators.MaxValueValidator(10)
                     ])),
                ('creativity',
                 models.IntegerField(validators=[
                     django.core.validators.MinValueValidator(1),
                     django.core.validators.MaxValueValidator(10)
                 ])),
                ('content',
                 models.IntegerField(validators=[
                     django.core.validators.MinValueValidator(1),
                     django.core.validators.MaxValueValidator(10)
                 ])),
                ('average', models.IntegerField(default=0)),
                ('post',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   related_name='likes',
                                   to='posts.Project')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'ratings',
            },
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('profile_picture',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('bio', models.TextField(default='bio')),
                ('contact', models.CharField(blank=True, max_length=200)),
                ('profile_Id', models.IntegerField(default=0)),
                ('all_projects',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='posts.Project')),
                ('user_profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='profile',
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'profiles',
            },
        ),
    ]
示例#29
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')),
                ('job_title',
                 models.CharField(blank=True, max_length=150, null=True)),
                ('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')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('project_name', models.CharField(max_length=120, null=True)),
                ('description',
                 models.TextField(max_length=1000,
                                  null=True,
                                  verbose_name='project Description')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('like', models.IntegerField(default=0)),
                ('profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='post_profile',
                                   to='awards.profile')),
            ],
        ),
        migrations.CreateModel(
            name='Screenshot',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image_1',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('image_2',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('image_3',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
            ],
        ),
        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)),
                ('project',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='awards.project')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('design',
                 models.IntegerField(validators=[
                     django.core.validators.MinValueValidator(1),
                     django.core.validators.MaxValueValidator(10)
                 ])),
                ('usability',
                 models.IntegerField(validators=[
                     django.core.validators.MinValueValidator(1),
                     django.core.validators.MaxValueValidator(10)
                 ])),
                ('content',
                 models.IntegerField(validators=[
                     django.core.validators.MinValueValidator(1),
                     django.core.validators.MaxValueValidator(10)
                 ])),
                ('profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='rater_profile',
                                   to='awards.profile')),
                ('project',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='post_ratings',
                                   to='awards.project')),
            ],
        ),
        migrations.AddField(
            model_name='project',
            name='screenshots',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='project_images',
                to='awards.screenshot'),
        ),
        migrations.AddField(
            model_name='project',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='post_user',
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='Likes',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('project',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='post_like',
                                   to='awards.project')),
                ('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)),
            ],
        ),
        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)),
                ('profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='commenter_profile',
                                   to='awards.profile')),
                ('project',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='post_comment',
                                   to='awards.project')),
            ],
        ),
    ]
示例#30
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_photo',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('bio', tinymce.models.HTMLField()),
                ('user',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['profile_photo'],
            },
        ),
        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')),
                ('name', tinymce.models.HTMLField()),
                ('caption', tinymce.models.HTMLField()),
                ('likes', models.IntegerField(default=0)),
                ('post_date', models.DateTimeField(auto_now_add=True)),
                ('profile',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='instagram.Profile')),
                ('user',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-name'],
            },
        ),
        migrations.CreateModel(
            name='Comments',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comments', tinymce.models.HTMLField()),
                ('image',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='instagram.Image')),
            ],
        ),
    ]