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

    dependencies = [
        ('art', '0006_auto_20191101_1708'),
    ]

    operations = [
        migrations.CreateModel(
            name='ColeccionArte',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(max_length=200, verbose_name='Título')),
                ('review',
                 models.CharField(max_length=310, verbose_name='Reseña')),
                ('cover_img',
                 models.ImageField(upload_to='portadas-coleccion/%Y/%m/%d',
                                   verbose_name='Portada')),
                ('created',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Fecha creación')),
                ('updated',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='Fecha edición')),
            ],
            options={
                'verbose_name': 'Colección Arte',
                'verbose_name_plural': 'Colecciones Arte',
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='ColeccionImages',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('file',
                 models.ImageField(blank=True,
                                   upload_to=art.models.get_image_filename)),
                ('coleccion',
                 models.ForeignKey(default=None,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='images',
                                   to='art.ColeccionArte')),
            ],
        ),
    ]
Exemplo n.º 2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Art',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(help_text='Max 250 characters',
                                  max_length=250)),
                ('body', models.TextField()),
                ('body_html', models.TextField(blank=True, editable=False)),
                ('pub_date',
                 models.DateTimeField(default=datetime.datetime.now)),
                ('art_type',
                 models.IntegerField(choices=[(1, 'Photography'),
                                              (2, 'Modelling'),
                                              (3, 'Sketches')],
                                     default=3)),
                ('tags',
                 tagging.fields.TagField(
                     blank=True,
                     help_text='Seperate tags with spaces.',
                     max_length=255)),
                ('url',
                 models.URLField(blank=True,
                                 null=True,
                                 unique=True,
                                 verbose_name='URL')),
                ('image_highres',
                 models.ImageField(
                     upload_to=art.models.Art.get_upload_path_high)),
                ('image_lowres',
                 models.ImageField(
                     upload_to=art.models.Art.get_upload_path_low)),
            ],
            options={
                'ordering': ['-pub_date'],
            },
        ),
    ]
Exemplo n.º 3
0
class Migration(migrations.Migration):

    dependencies = [
        ('art', '0006_art_slug'),
    ]

    operations = [
        migrations.CreateModel(
            name='Art_Url',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('body', models.TextField()),
                ('body_html', models.TextField(blank=True, editable=False)),
                ('url',
                 models.URLField(blank=True, null=True, verbose_name='URL')),
                ('sequence', models.IntegerField()),
            ],
            options={
                'ordering': ['sequence'],
            },
        ),
        migrations.AlterField(
            model_name='art',
            name='image_highres',
            field=models.ImageField(
                blank=True,
                null=True,
                upload_to=art.models.Art.get_upload_path_high),
        ),
        migrations.AlterField(
            model_name='art',
            name='image_lowres',
            field=models.ImageField(
                blank=True,
                null=True,
                upload_to=art.models.Art.get_upload_path_low),
        ),
        migrations.AddField(
            model_name='art_url',
            name='art',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='art.Art'),
        ),
    ]
Exemplo n.º 4
0
class Migration(migrations.Migration):

    dependencies = [
        ('art', '0004_art_cover'),
    ]

    operations = [
        migrations.CreateModel(
            name='Chapter',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='名称')),
                ('content', models.TextField(verbose_name='内容')),
                ('publish_date', models.DateTimeField(auto_now_add=True, verbose_name='发布时间')),
            ],
            options={
                'verbose_name': '章节',
                'verbose_name_plural': '章节',
                'db_table': 't_chapter',
                'ordering': ['publish_date'],
            },
        ),
        migrations.CreateModel(
            name='RollSet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, unique=True, verbose_name='名称')),
                ('free_level', models.IntegerField(choices=[(0, '免费'), (1, 'VIP')], default=0, verbose_name='免费级别')),
            ],
            options={
                'verbose_name': '卷集',
                'verbose_name_plural': '卷集',
                'db_table': 't_roll',
                'ordering': ['id'],
            },
        ),
        migrations.AlterField(
            model_name='art',
            name='cover',
            field=models.ImageField(blank=True, null=True, upload_to=art.models.save_file_path, verbose_name='封面'),
        ),
        migrations.AddField(
            model_name='rollset',
            name='art',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='art.Art', verbose_name='所属文章'),
        ),
        migrations.AddField(
            model_name='chapter',
            name='roll',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='art.RollSet', verbose_name='所属卷集'),
        ),
    ]
Exemplo n.º 5
0
class Migration(migrations.Migration):

    dependencies = [
        ('art', '0006_auto_20180829_1131'),
    ]

    operations = [
        migrations.AlterField(
            model_name='art',
            name='cover',
            field=models.ImageField(blank=True, null=True, upload_to=art.models.save_file_path, verbose_name='封面'),
        ),
    ]
Exemplo n.º 6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Art',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('content', models.TextField(default='', max_length=500)),
                ('image', models.ImageField(default='', upload_to=art.models.get_art_image_path)),
            ],
        ),
    ]
Exemplo n.º 7
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Art',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('image',
                 models.ImageField(
                     help_text='The image thats appears on homepage',
                     upload_to=art.models.art_directory_path)),
                ('short_description',
                 models.CharField(
                     help_text='The text appears on homepage, no use of html',
                     max_length=100)),
                ('description',
                 models.TextField(
                     blank=True,
                     help_text=
                     'The full description for the art page. HTML USE',
                     null=True)),
                ('slug',
                 models.SlugField(blank=True,
                                  help_text='Dont change it!!',
                                  null=True)),
                ('seo_title',
                 models.CharField(blank=True, max_length=60, null=True)),
                ('seo_description',
                 models.CharField(
                     blank=True,
                     help_text=
                     'The text thats appears on google for the site description. If left null will get the first 160 characters from description.',
                     max_length=160,
                     null=True)),
                ('seo_keywords',
                 models.CharField(
                     blank=True,
                     help_text=
                     'Use words that appears oon text, synonyms and no spam for better use.',
                     max_length=160,
                     null=True)),
                ('active', models.BooleanField(default=True)),
                ('image_background_page',
                 models.ImageField(
                     blank=True,
                     help_text=
                     'Its for the background page cover, uf left black, it will appear black',
                     null=True,
                     upload_to=art.models.art_background_directory_path)),
                ('css_background_color',
                 models.CharField(
                     blank=True,
                     help_text='Use hex color or colors like blue etc',
                     max_length=50,
                     null=True,
                     validators=[art.models.validate_hex_color],
                     verbose_name='Background Color')),
                ('css_font_color',
                 models.CharField(
                     blank=True,
                     help_text='Use hex color or colors like blue etc',
                     max_length=50,
                     null=True,
                     validators=[art.models.validate_hex_color],
                     verbose_name='Font Color')),
                ('css_font_style',
                 models.CharField(
                     default='sans-serif',
                     help_text='Use hex color or colors like blue etc',
                     max_length=50,
                     verbose_name='Font Style')),
            ],
            managers=[
                ('my_query', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='ImageArt',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=60)),
                ('alt', models.CharField(blank=True, max_length=60,
                                         null=True)),
                ('image',
                 models.ImageField(upload_to=art.models.user_directory_path)),
                ('active', models.BooleanField(default=True)),
                ('project_related',
                 models.ForeignKey(
                     help_text='Pick the project image is related',
                     on_delete=django.db.models.deletion.CASCADE,
                     to='art.Art')),
            ],
        ),
    ]
Exemplo n.º 8
0
class Migration(migrations.Migration):

    dependencies = [
        ('art', '0011_auto_20180829_0943'),
    ]

    operations = [
        migrations.CreateModel(
            name='Chapter',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='章节名称')),
                ('content', models.TextField(verbose_name='文章内容')),
                ('pulish_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='发表时间')),
            ],
            options={
                'verbose_name': '单章详情',
                'verbose_name_plural': '单章详情',
                'db_table': 't_chapter',
                'ordering': ['pulish_time'],
            },
        ),
        migrations.CreateModel(
            name='Rollset',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50,
                                  unique=True,
                                  verbose_name='名称')),
                ('free_level',
                 models.IntegerField(choices=[(0, '免费'), (1, 'VIP')],
                                     default=0,
                                     verbose_name='免费级别')),
            ],
            options={
                'verbose_name': '卷集',
                'verbose_name_plural': '卷集',
                'db_table': 't_roll',
                'ordering': ['id'],
            },
        ),
        migrations.AlterField(
            model_name='art',
            name='change_time',
            field=models.DateTimeField(auto_now=True, verbose_name='最近更新时间'),
        ),
        migrations.AlterField(
            model_name='art',
            name='img',
            field=models.ImageField(blank=True,
                                    null=True,
                                    upload_to=art.models.new_file_name,
                                    verbose_name='封面'),
        ),
        migrations.AlterField(
            model_name='art',
            name='pulish_data',
            field=models.DateTimeField(auto_now_add=True, verbose_name='发布时间'),
        ),
        migrations.AlterField(
            model_name='art',
            name='tags',
            field=models.ManyToManyField(to='art.Tag', verbose_name='标签'),
        ),
        migrations.AddField(
            model_name='rollset',
            name='art',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='art.Art',
                verbose_name='所属小说'),
        ),
        migrations.AddField(
            model_name='chapter',
            name='roll',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='art.Rollset',
                verbose_name='所属卷集'),
        ),
    ]