Beispiel #1
0
class Migration(migrations.Migration):

    dependencies = [
        ('ports', '0020_remove_user_zipcode'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='photo',
            name='user_profile',
        ),
        migrations.AddField(
            model_name='user',
            name='profile_pic',
            field=models.ImageField(
                default='media/default.jpg',
                null=True,
                upload_to=apps.ports.models.user_directory_path),
        ),
        migrations.AlterField(
            model_name='photo',
            name='title',
            field=models.CharField(max_length=255, null=True),
        ),
    ]
Beispiel #2
0
class Migration(migrations.Migration):

    dependencies = [
        ('ports', '0036_auto_20180802_2023'),
    ]

    operations = [
        migrations.AlterField(
            model_name='photo',
            name='image',
            field=models.ImageField(upload_to=apps.ports.models.user_directory_path),
        ),
        migrations.AlterField(
            model_name='user',
            name='profile_pic',
            field=models.ImageField(upload_to=apps.ports.models.user_directory_path_profile),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('ports', '0021_auto_20180427_0140'),
    ]

    operations = [
        migrations.AlterField(
            model_name='user',
            name='profile_pic',
            field=models.ImageField(default='media/default.jpg', upload_to=apps.ports.models.user_directory_path_profile),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('ports', '0015_photo_user_profile'),
    ]

    operations = [
        migrations.AlterField(
            model_name='photo',
            name='image',
            field=models.ImageField(
                upload_to=apps.ports.models.user_directory_path),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('ports', '0023_auto_20180427_1031'),
    ]

    operations = [
        migrations.AlterField(
            model_name='user',
            name='profile_pic',
            field=models.ImageField(
                null=True,
                upload_to=apps.ports.models.user_directory_path_profile),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('ports', '0029_auto_20180716_1413'),
    ]

    operations = [
        migrations.CreateModel(
            name='Chat',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('modified_on', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('message', models.TextField(max_length=500)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('modified_on', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.AlterField(
            model_name='user',
            name='profile_pic',
            field=models.ImageField(
                default='media/default.jpg',
                upload_to=apps.ports.models.user_directory_path_profile),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='message',
            name='author',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='my_messages',
                to='ports.User'),
        ),
        migrations.AddField(
            model_name='message',
            name='chatroom',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='chats_messages',
                to='ports.Chat'),
        ),
        migrations.AddField(
            model_name='chat',
            name='messengers',
            field=models.ManyToManyField(related_name='my_chatrooms',
                                         to='ports.User'),
        ),
    ]