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

    dependencies = [
        ('RestApp', '0005_auto_20181007_1103'),
    ]

    operations = [
        migrations.AlterField(
            model_name='post',
            name='created',
            field=models.DateTimeField(default=datetime.datetime(2018, 10, 7, 11, 5, 17, 940222)),
        ),
        migrations.AlterField(
            model_name='profile',
            name='Address',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='RestApp.address'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='Avatar',
            field=models.ImageField(blank=True, null=True, upload_to=RestApp.models.filename),
        ),
        migrations.AlterField(
            model_name='profile',
            name='Gender',
            field=models.CharField(blank=True, choices=[('Male', 'Male'), ('Female', 'Female'), ('Others', 'Others')], max_length=10, null=True),
        ),
        migrations.AlterField(
            model_name='profile',
            name='Phone',
            field=models.CharField(blank=True, max_length=15, null=True),
        ),
    ]
Exemplo n.º 2
0
class Migration(migrations.Migration):

    dependencies = [
        ('RestApp', '0004_auto_20181007_1053'),
    ]

    operations = [
        migrations.AlterField(
            model_name='post',
            name='created',
            field=models.DateTimeField(
                default=datetime.datetime(2018, 10, 7, 11, 3, 36, 28798)),
        ),
        migrations.AlterField(
            model_name='profile',
            name='Address',
            field=models.OneToOneField(
                blank=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='RestApp.address'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='Avatar',
            field=models.ImageField(blank=True,
                                    upload_to=RestApp.models.filename),
        ),
        migrations.AlterField(
            model_name='profile',
            name='Phone',
            field=models.CharField(blank=True, max_length=15),
        ),
    ]
Exemplo n.º 3
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(blank=True, null=True, upload_to=RestApp.models.postname)),
                ('created', models.DateTimeField(default=datetime.datetime(2018, 10, 2, 17, 45, 0, 80093))),
                ('description', models.CharField(blank=True, max_length=200)),
            ],
        ),
        migrations.AlterField(
            model_name='profile',
            name='Address',
            field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to='RestApp.address'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='Avatar',
            field=models.ImageField(blank=True, default=None, upload_to=RestApp.models.filename),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='profile',
            name='Phone',
            field=models.CharField(blank=True, default=None, max_length=15),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='profile',
            name='User',
            field=models.OneToOneField(blank=True, default=None, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='post',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='RestApp.Profile'),
        ),
    ]
Exemplo n.º 4
0
class Migration(migrations.Migration):

    dependencies = [
        ('RestApp', '0002_auto_20181002_1745'),
    ]

    operations = [
        migrations.AlterField(
            model_name='post',
            name='created',
            field=models.DateTimeField(
                default=datetime.datetime(2018, 10, 2, 17, 48, 29, 913448)),
        ),
        migrations.AlterField(
            model_name='profile',
            name='Address',
            field=models.OneToOneField(
                default=None,
                on_delete=django.db.models.deletion.CASCADE,
                to='RestApp.address'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='Avatar',
            field=models.ImageField(default=None,
                                    upload_to=RestApp.models.filename),
        ),
        migrations.AlterField(
            model_name='profile',
            name='Phone',
            field=models.CharField(default=None, max_length=15),
        ),
        migrations.AlterField(
            model_name='profile',
            name='User',
            field=models.OneToOneField(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
    ]
Exemplo n.º 5
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')),
                ('Door',
                 models.CharField(help_text=' Door No of the house',
                                  max_length=50)),
                ('Street',
                 models.CharField(help_text=' Street of the residence',
                                  max_length=50)),
                ('City',
                 models.CharField(help_text='Current city', max_length=50)),
                ('Pincode',
                 models.IntegerField(help_text='zip code of the locality')),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Gender',
                 models.CharField(choices=[('Male', 'Male'),
                                           ('Female', 'Female'),
                                           ('Others', 'Others')],
                                  max_length=10)),
                ('Phone', models.CharField(blank=True,
                                           max_length=15,
                                           null=True)),
                ('Avatar',
                 models.ImageField(blank=True,
                                   null=-1,
                                   upload_to=RestApp.models.filename)),
                ('Address',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to='RestApp.address')),
                ('User',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]