Esempio n. 1
0
class Migration(migrations.Migration):

    dependencies = [
        ('blog', '0002_category_a_laptop_category_phone'),
    ]

    operations = [
        migrations.CreateModel(
            name='Product_Phone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, db_index=True, max_length=50)),
                ('slug', models.SlugField(blank=True, unique=True)),
                ('image', models.ImageField(db_index=True, upload_to=blog.models.media)),
                ('camera', models.CharField(blank=True, db_index=True, max_length=50)),
                ('memory', models.CharField(blank=True, db_index=True, max_length=50)),
                ('thach_id', models.CharField(blank=True, db_index=True, max_length=50)),
                ('cairt_sim', models.CharField(blank=True, db_index=True, max_length=50)),
                ('accessory', models.CharField(blank=True, db_index=True, max_length=50)),
                ('decimal', models.DecimalField(blank=True, decimal_places=3, max_digits=6)),
                ('product_phone_catalog', models.ManyToManyField(blank=True, related_name='catalog_product_phone', to='blog.Catalog')),
                ('product_phone_category', models.ManyToManyField(blank=True, related_name='category_product_phone', to='blog.Category_Phone')),
            ],
        ),
        migrations.CreateModel(
            name='Product_a_laptop',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, db_index=True, max_length=50)),
                ('slug', models.SlugField(blank=True, unique=True)),
                ('image', models.ImageField(db_index=True, upload_to=blog.models.media)),
                ('weight', models.CharField(blank=True, db_index=True, max_length=30)),
                ('memory', models.CharField(blank=True, db_index=True, max_length=30)),
                ('ssd', models.CharField(blank=True, db_index=True, max_length=30)),
                ('touch', models.CharField(blank=True, db_index=True, max_length=30)),
                ('accessory', models.CharField(blank=True, db_index=True, max_length=50)),
                ('decimal', models.DecimalField(blank=True, decimal_places=3, max_digits=6)),
                ('product_a_laptop_catalog', models.ManyToManyField(blank=True, related_name='catalog_product_a_laptop', to='blog.Catalog')),
                ('product_a_laptop_category', models.ManyToManyField(blank=True, related_name='category_product_a_laptop', to='blog.Category_a_laptop')),
            ],
        ),
    ]
Esempio n. 2
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Catalog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(db_index=True, max_length=150)),
                ('slug', models.SlugField(unique=True)),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
            ],
        ),
        migrations.CreateModel(
            name='Category_a_laptop',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('slug', models.SlugField(unique=True)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='a_laptop_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
            ],
        ),
        migrations.CreateModel(
            name='Category_Phone',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('slug', models.SlugField(unique=True)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='phone_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
            ],
        ),
        migrations.CreateModel(
            name='Category_TV',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('slug', models.SlugField(unique=True)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='tv_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
            ],
        ),
        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()),
            ],
        ),
        migrations.CreateModel(
            name='Xiaomi',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('onnect', models.CharField(db_index=True, max_length=30)),
                ('memory', models.CharField(db_index=True, max_length=30)),
                ('camera', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='xiaomi_phone_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_phone',
                 models.ManyToManyField(blank=True,
                                        related_name='xiaomi_phone',
                                        to='blog.Category_Phone')),
                ('xiaomi_phone',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_Phone')),
            ],
        ),
        migrations.CreateModel(
            name='Sony',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('screen', models.CharField(db_index=True, max_length=30)),
                ('connect', models.CharField(db_index=True, max_length=30)),
                ('size', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='sony_tv_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_tv',
                 models.ManyToManyField(blank=True,
                                        related_name='sony_tv',
                                        to='blog.Category_TV')),
                ('sonys_tv',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_TV')),
            ],
        ),
        migrations.CreateModel(
            name='Samsung_TV',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('screen', models.CharField(db_index=True, max_length=30)),
                ('connect', models.CharField(db_index=True, max_length=30)),
                ('size', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='samsung_tv_tv_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_tv',
                 models.ManyToManyField(blank=True,
                                        related_name='samsung_tv_tv',
                                        to='blog.Category_TV')),
                ('samsungs_tv',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_TV')),
            ],
        ),
        migrations.CreateModel(
            name='Samsung',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('camera', models.CharField(db_index=True, max_length=30)),
                ('memory', models.CharField(db_index=True, max_length=30)),
                ('connect', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='samsung_phone_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_phone',
                 models.ManyToManyField(blank=True,
                                        related_name='samsung_phone',
                                        to='blog.Category_Phone')),
                ('samsung_phone',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_Phone')),
            ],
        ),
        migrations.CreateModel(
            name='Panasonic',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('screen', models.CharField(db_index=True, max_length=30)),
                ('connect', models.CharField(db_index=True, max_length=30)),
                ('size', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='panasonic_tv_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_tv',
                 models.ManyToManyField(blank=True,
                                        related_name='panasonic_tv',
                                        to='blog.Category_TV')),
                ('panasonic_tv',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_TV')),
            ],
        ),
        migrations.CreateModel(
            name='OrderItem',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('item',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Item')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('start_date', models.DateTimeField(auto_now_add=True)),
                ('ordered_date', models.DateTimeField()),
                ('ordered', models.BooleanField(default=False)),
                ('items', models.ManyToManyField(to='blog.OrderItem')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Mac_OS',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('touch',
                 models.CharField(blank=True, db_index=True, max_length=30)),
                ('weight', models.CharField(db_index=True, max_length=30)),
                ('memory', models.CharField(db_index=True, max_length=30)),
                ('onnect', models.CharField(db_index=True, max_length=30)),
                ('thickness', models.CharField(db_index=True, max_length=30)),
                ('ssd', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='mac_os_a_laptop_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_a_laptop',
                 models.ManyToManyField(blank=True,
                                        related_name='mac_os_a_laptop',
                                        to='blog.Category_a_laptop')),
                ('mac_a_laptop',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_a_laptop')),
            ],
        ),
        migrations.CreateModel(
            name='LG',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('screen', models.CharField(db_index=True, max_length=30)),
                ('connect', models.CharField(db_index=True, max_length=30)),
                ('size', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='lg_tv_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_tv',
                 models.ManyToManyField(blank=True,
                                        related_name='lg_tv',
                                        to='blog.Category_TV')),
                ('lgs_tv',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_TV')),
            ],
        ),
        migrations.CreateModel(
            name='ASUS',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('touch',
                 models.CharField(blank=True, db_index=True, max_length=30)),
                ('weight', models.CharField(db_index=True, max_length=30)),
                ('memory', models.CharField(db_index=True, max_length=30)),
                ('onnect', models.CharField(db_index=True, max_length=30)),
                ('thickness',
                 models.CharField(blank=True, db_index=True, max_length=30)),
                ('ssd', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('asus_a_laptop',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_a_laptop')),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='asus_a_laptop_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_a_laptop',
                 models.ManyToManyField(blank=True,
                                        related_name='asus_a_laptop',
                                        to='blog.Category_a_laptop')),
            ],
        ),
        migrations.CreateModel(
            name='Apple',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('connect', models.CharField(db_index=True, max_length=30)),
                ('memory', models.CharField(db_index=True, max_length=30)),
                ('camera', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('apple_phone',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_Phone')),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='apple_phone_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_phone',
                 models.ManyToManyField(blank=True,
                                        related_name='apple_phone',
                                        to='blog.Category_Phone')),
            ],
        ),
        migrations.CreateModel(
            name='ACER',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(db_index=True,
                                   upload_to=blog.models.media)),
                ('slug', models.SlugField(unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('touch',
                 models.CharField(blank=True, db_index=True, max_length=30)),
                ('weight', models.CharField(db_index=True, max_length=30)),
                ('memory', models.CharField(db_index=True, max_length=30)),
                ('onnect', models.CharField(db_index=True, max_length=30)),
                ('thickness', models.CharField(db_index=True, max_length=30)),
                ('ssd', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(decimal_places=2,
                                                max_digits=5)),
                ('acer_a_laptop',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Category_a_laptop')),
                ('catalog',
                 models.ManyToManyField(blank=True,
                                        related_name='acer_a_laptop_catalog',
                                        to='blog.Catalog')),
                ('catalogs',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Catalog')),
                ('category_a_laptop',
                 models.ManyToManyField(blank=True,
                                        related_name='acer_a_laptop',
                                        to='blog.Category_a_laptop')),
            ],
        ),
    ]
Esempio n. 3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Catalog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(db_index=True, max_length=150)),
                ('slug', models.SlugField(unique=True)),
                ('image', models.ImageField(db_index=True, upload_to=blog.models.media)),
            ],
        ),
        migrations.CreateModel(
            name='Category_a_laptop',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField(unique=True)),
                ('catalog', models.ManyToManyField(blank=True, related_name='a_laptop_catalog', to='blog.Catalog')),
                ('catalogs', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.Catalog')),
            ],
        ),
        migrations.CreateModel(
            name='Category_Phone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField(unique=True)),
                ('catalog', models.ManyToManyField(blank=True, related_name='phone_catalog', to='blog.Catalog')),
                ('catalogs', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.Catalog')),
            ],
        ),
        migrations.CreateModel(
            name='Category_TV',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField(unique=True)),
                ('catalog', models.ManyToManyField(blank=True, related_name='tv_catalog', to='blog.Catalog')),
                ('catalogs', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.Catalog')),
            ],
        ),
        migrations.CreateModel(
            name='Product_TV',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(db_index=True, upload_to=blog.models.media)),
                ('slug', models.SlugField(blank=True, unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('screen', models.CharField(db_index=True, max_length=30)),
                ('connect', models.CharField(db_index=True, max_length=30)),
                ('size', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(blank=True, decimal_places=2, max_digits=5)),
                ('catalog', models.ManyToManyField(blank=True, related_name='catalog_tv', to='blog.Catalog')),
                ('category_tv', models.ManyToManyField(blank=True, related_name='tv', to='blog.Category_TV')),
            ],
        ),
        migrations.CreateModel(
            name='Product_Phone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(db_index=True, upload_to=blog.models.media)),
                ('slug', models.SlugField(blank=True, unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('camera', models.CharField(db_index=True, max_length=30)),
                ('memory', models.CharField(db_index=True, max_length=30)),
                ('connect', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(blank=True, decimal_places=2, max_digits=5)),
                ('catalog', models.ManyToManyField(blank=True, related_name='catalog_phone', to='blog.Catalog')),
                ('category_phone', models.ManyToManyField(blank=True, related_name='phone', to='blog.Category_Phone')),
            ],
        ),
        migrations.CreateModel(
            name='Product_a_laptop',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(db_index=True, upload_to=blog.models.media)),
                ('slug', models.SlugField(blank=True, unique=True)),
                ('title', models.CharField(db_index=True, max_length=30)),
                ('touch', models.CharField(blank=True, db_index=True, max_length=30)),
                ('weight', models.CharField(db_index=True, max_length=30)),
                ('memory', models.CharField(db_index=True, max_length=30)),
                ('onnect', models.CharField(db_index=True, max_length=30)),
                ('thickness', models.CharField(db_index=True, max_length=30)),
                ('ssd', models.CharField(db_index=True, max_length=30)),
                ('decimal', models.DecimalField(blank=True, decimal_places=2, max_digits=5)),
                ('catalog', models.ManyToManyField(blank=True, related_name='catalog_a_laptop', to='blog.Catalog')),
                ('category_a_laptop', models.ManyToManyField(blank=True, related_name='a_laptop', to='blog.Category_a_laptop')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    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. 30 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=30,
                     unique=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             '^[\\w.@+-]+$',
                             'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.'
                         )
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='last name')),
                ('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')),
                ('accesskey',
                 models.CharField(max_length=32,
                                  unique=True,
                                  validators=[blog.models.validate_authkey])),
                ('secretkey',
                 models.CharField(max_length=32,
                                  validators=[blog.models.validate_authkey])),
                ('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',
                'abstract': False,
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Blog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('tagline', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Entry',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('headline', models.CharField(max_length=255)),
                ('body_text', models.TextField()),
                ('pub_date', models.DateField(auto_now_add=True)),
                ('mod_date', models.DateField(auto_now=True)),
                ('number_comments', models.IntegerField()),
                ('scoring', models.DecimalField(decimal_places=2,
                                                max_digits=3)),
                ('blog',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Blog')),
                ('users', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Esempio n. 5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('stars_count',
                 models.DecimalField(decimal_places=1,
                                     default=5,
                                     max_digits=2,
                                     verbose_name='calificación')),
                ('first_name',
                 models.CharField(max_length=255, verbose_name='Nombres')),
                ('email',
                 models.EmailField(max_length=254, verbose_name='Email')),
                ('body',
                 models.TextField(
                     verbose_name=
                     'Escribe el porqué dejas este comentario y calificación')
                 ),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('active', models.BooleanField(default=False)),
            ],
            options={
                'ordering': ['created_on'],
            },
        ),
        migrations.CreateModel(
            name='Hojavida',
            fields=[
                ('imagen',
                 models.ImageField(upload_to='',
                                   verbose_name='Foto de perfil')),
                ('id',
                 models.IntegerField(primary_key=True,
                                     serialize=False,
                                     unique=True,
                                     verbose_name='Identificación')),
                ('first_name',
                 models.CharField(max_length=255, verbose_name='Nombres')),
                ('last_name',
                 models.CharField(max_length=255, verbose_name='Apellidos')),
                ('birth_date',
                 models.DateField(
                     verbose_name='Fecha de nacimiento(mm/dd/yyyy)')),
                ('sex',
                 models.CharField(choices=[('M', 'Masculino'),
                                           ('F', 'Femenino'), ('O', 'Otro')],
                                  max_length=10,
                                  verbose_name='Sexo')),
                ('email',
                 models.EmailField(max_length=255,
                                   unique=True,
                                   verbose_name='email')),
                ('num_telefono', models.IntegerField(verbose_name='Celular')),
                ('residencia',
                 models.CharField(max_length=255,
                                  verbose_name='Dirección de residencia')),
                ('habilidades',
                 models.TextField(verbose_name='Habilidades y aptitudes')),
                ('experiencia_lab',
                 models.TextField(verbose_name='Experiencia laboral')),
                ('formacion',
                 models.TextField(verbose_name='Formación académica')),
                ('stars_count',
                 models.DecimalField(decimal_places=1, default=5,
                                     max_digits=2)),
                ('fecha_inicio',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Inicio de suscripción')),
                ('fecha_fin',
                 models.DateTimeField(default=blog.models.now_plus_30,
                                      verbose_name='Fin de suscripción')),
                ('pagos',
                 models.IntegerField(default=0,
                                     verbose_name='Pagos realizados')),
                ('title',
                 models.CharField(
                     max_length=200,
                     verbose_name='Escribe un título a tu servicio')),
                ('slug',
                 models.SlugField(blank=True, max_length=200, unique=True)),
                ('updated_on', models.DateTimeField(auto_now=True)),
                ('content',
                 models.TextField(
                     verbose_name=
                     'Escribe una breve descripción de como brindas tu servicio de niñera'
                 )),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('status',
                 models.IntegerField(choices=[(0, 'Draft'), (1, 'Publish')],
                                     default=0)),
                ('suscripcion',
                 models.IntegerField(choices=[(0, 'Finalizada'),
                                              (1, 'Activa')],
                                     default=0)),
            ],
            options={
                'ordering': ['-created_on'],
            },
        ),
    ]