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

    dependencies = [
        ('communities', '0003_auto_20191228_2117'),
    ]

    operations = [
        migrations.AlterField(
            model_name='communities',
            name='avatarimage',
            field=models.ImageField(
                upload_to=communities.models.upload_location_avatarimage),
        ),
        migrations.AlterField(
            model_name='communities',
            name='backgroundimage',
            field=models.ImageField(
                upload_to=communities.models.upload_location_backgroundimage),
        ),
        migrations.AlterField(
            model_name='communities',
            name='description',
            field=models.TextField(max_length=5000),
        ),
        migrations.AlterField(
            model_name='communities',
            name='name',
            field=models.CharField(max_length=100),
        ),
    ]
Ejemplo n.º 2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Communties',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=100)),
                ('description', models.TextField(blank=True, max_length=5000)),
                ('backgroundimage',
                 models.ImageField(blank=True,
                                   upload_to=communities.models.
                                   upload_location_backgroundimage)),
                ('avatarimage',
                 models.ImageField(
                     upload_to=communities.models.upload_location_avatarimage)
                 ),
                ('date_created',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='date created')),
                ('date_updated',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='date updated')),
                ('slug', models.SlugField(blank=True, unique=True)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('communities', '0006_invitation'),
    ]

    operations = [
        migrations.AddField(
            model_name='community',
            name='avatar',
            field=models.ImageField(
                blank=True,
                upload_to=communities.models.community_avatar_path,
                verbose_name='头像'),
        ),
    ]
Ejemplo n.º 4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Communities',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=120)),
                ('slug', models.SlugField(unique=True)),
                ('description', models.TextField()),
                ('updated', models.DateTimeField(auto_now=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('image', models.ImageField(blank=True, height_field=b'height_field', null=True, upload_to=communities.models.upload_location, width_field=b'width_field')),
                ('height_field', models.IntegerField(default=0)),
                ('width_field', models.IntegerField(default=0)),
            ],
        ),
    ]
Ejemplo n.º 5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Community',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('creation_date', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField(default=True)),
                ('invitation_required', models.BooleanField(default=False)),
                ('adult', models.BooleanField(default=False)),
                ('text_color', models.PositiveSmallIntegerField(default=0)),
                ('background_color',
                 models.PositiveSmallIntegerField(default=0)),
                ('background_img',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=communities.models.img_filename_generator,
                     validators=[communities.models.file_size_validator])),
                ('slug',
                 models.SlugField(default='', max_length=100, unique=True)),
            ],
            options={
                'ordering': ('id', ),
            },
        ),
    ]