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

    dependencies = [
        ('bora', '0004_auto_20171210_1854'),
    ]

    operations = [
        migrations.CreateModel(
            name='Artwork',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=255,
                                           verbose_name='Title')),
                ('description', models.TextField(verbose_name='Description')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('full_image',
                 models.FileField(upload_to=bora.models.user_gallery_path)),
                ('thumbnail',
                 models.FileField(upload_to=bora.models.user_gallery_path)),
                ('author',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Gallery',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=255,
                                           verbose_name='Title')),
                ('description', models.TextField(verbose_name='Description')),
            ],
        ),
        migrations.AlterField(
            model_name='article',
            name='updated_at',
            field=models.DateTimeField(auto_now=True),
        ),
        migrations.AddField(
            model_name='artwork',
            name='gallery',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='bora.Gallery'),
        ),
    ]
Example #2
0
class Migration(migrations.Migration):

    dependencies = [
        ('bora', '0011_auto_20171217_1712'),
    ]

    operations = [
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=255,
                                          verbose_name='Name')),
                ('introduction',
                 models.TextField(verbose_name='Introduction')),
                ('ending', models.TextField(verbose_name='Ending')),
                ('year', models.PositiveIntegerField(verbose_name='Year')),
                ('views', models.PositiveIntegerField(default=0)),
                ('description', models.TextField(verbose_name='Description')),
            ],
        ),
        migrations.CreateModel(
            name='Report',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 sorl.thumbnail.fields.ImageField(
                     blank=True, null=True, upload_to=bora.models.aliiki)),
                ('report',
                 models.TextField(blank=True, null=True,
                                  verbose_name='Report')),
                ('author',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('event',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='bora.Event')),
            ],
        ),
    ]
Example #3
0
class Migration(migrations.Migration):

    dependencies = [
        ('bora', '0006_auto_20171212_2224'),
    ]

    operations = [
        migrations.CreateModel(
            name='Rank',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.TextField(verbose_name='Name')),
            ],
        ),
        migrations.AddField(
            model_name='user',
            name='about',
            field=models.TextField(null=True, verbose_name='About'),
        ),
        migrations.AddField(
            model_name='user',
            name='aliik',
            field=sorl.thumbnail.fields.ImageField(
                null=True, upload_to=bora.models.aliiki),
        ),
        migrations.AddField(
            model_name='user',
            name='art_name',
            field=models.TextField(null=True, verbose_name='Art name'),
        ),
        migrations.AddField(
            model_name='user',
            name='op_name',
            field=models.TextField(null=True, verbose_name='Operation name'),
        ),
        migrations.AddField(
            model_name='user',
            name='story',
            field=models.TextField(null=True, verbose_name='Story'),
        ),
    ]
Example #4
0
class Migration(migrations.Migration):

    dependencies = [
        ('bora', '0008_user_rank'),
    ]

    operations = [
        migrations.AddField(
            model_name='user',
            name='name',
            field=models.TextField(blank=True, null=True, verbose_name='Name'),
        ),
        migrations.AlterField(
            model_name='user',
            name='about',
            field=models.TextField(blank=True, null=True, verbose_name='About'),
        ),
        migrations.AlterField(
            model_name='user',
            name='aliik',
            field=sorl.thumbnail.fields.ImageField(blank=True, null=True, upload_to=bora.models.aliiki),
        ),
        migrations.AlterField(
            model_name='user',
            name='art_name',
            field=models.TextField(blank=True, null=True, verbose_name='Art name'),
        ),
        migrations.AlterField(
            model_name='user',
            name='op_name',
            field=models.TextField(blank=True, null=True, verbose_name='Operation name'),
        ),
        migrations.AlterField(
            model_name='user',
            name='rank',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='bora.Rank'),
        ),
        migrations.AlterField(
            model_name='user',
            name='story',
            field=models.TextField(blank=True, null=True, verbose_name='Story'),
        ),
    ]
Example #5
0
class Migration(migrations.Migration):

    dependencies = [
        ('bora', '0012_event_report'),
    ]

    operations = [
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('review',
                 models.TextField(blank=True, null=True,
                                  verbose_name='Review')),
                ('rating',
                 models.PositiveIntegerField(validators=[
                     django.core.validators.MinValueValidator(0),
                     django.core.validators.MaxValueValidator(100)
                 ],
                                             verbose_name='Rating')),
                ('author',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ReviewCategory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=255,
                                          verbose_name='Name')),
            ],
        ),
        migrations.CreateModel(
            name='ReviewItem',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=255,
                                           verbose_name='Title')),
                ('cover',
                 sorl.thumbnail.fields.ImageField(
                     blank=True, null=True, upload_to=bora.models.covers)),
                ('org_title',
                 models.CharField(max_length=255, verbose_name='Title')),
                ('author',
                 models.CharField(max_length=255, verbose_name='Author')),
                ('translator',
                 models.CharField(max_length=255,
                                  null=True,
                                  verbose_name='Author')),
                ('category',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='bora.ReviewCategory')),
            ],
        ),
        migrations.AddField(
            model_name='review',
            name='item',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='bora.ReviewItem'),
        ),
    ]