1 from os.path import join
2 from django.conf import settings
3 from django.db import models, migrations
4 import django.db.models.deletion
5 import sorl.thumbnail.fields
6 import django.core.files.storage
9 class Migration(migrations.Migration):
15 migrations.CreateModel(
18 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
19 ('title', models.CharField(max_length=120, verbose_name='Title')),
20 ('slug', models.SlugField(unique=True, max_length=120, verbose_name='Slug')),
21 ('sort_key', models.CharField(verbose_name='Sort key', max_length=120, editable=False, db_index=True)),
22 ('sort_key_author', models.CharField(default='', verbose_name='sort key by author', max_length=120, editable=False, db_index=True)),
23 ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='creation date', db_index=True)),
24 ('changed_at', models.DateTimeField(auto_now=True, verbose_name='creation date', db_index=True)),
25 ('xml_file', models.FileField(upload_to='xml', storage=django.core.files.storage.FileSystemStorage(base_url='/media/pictures/', location=join(settings.MEDIA_ROOT, 'pictures')), verbose_name='xml_file')),
26 ('image_file', sorl.thumbnail.fields.ImageField(upload_to='images', storage=django.core.files.storage.FileSystemStorage(base_url='/media/pictures/', location=join(settings.MEDIA_ROOT, 'pictures')), verbose_name='image_file')),
27 ('html_file', models.FileField(upload_to='html', storage=django.core.files.storage.FileSystemStorage(base_url='/media/pictures/', location=join(settings.MEDIA_ROOT, 'pictures')), verbose_name='html_file')),
28 ('areas_json', models.TextField(default='{}', verbose_name='picture areas JSON', editable=False)),
29 ('extra_info', models.TextField(default={}, verbose_name='Additional information')),
30 ('culturepl_link', models.CharField(max_length=240, blank=True)),
31 ('wiki_link', models.CharField(max_length=240, blank=True)),
32 ('_related_info', models.TextField(null=True, editable=False, blank=True)),
33 ('width', models.IntegerField(null=True)),
34 ('height', models.IntegerField(null=True)),
37 'ordering': ('sort_key',),
38 'verbose_name': 'picture',
39 'verbose_name_plural': 'pictures',
41 bases=(models.Model,),
43 migrations.CreateModel(
46 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
47 ('area', models.TextField(default='{}', verbose_name='area', editable=False)),
48 ('kind', models.CharField(db_index=True, max_length=10, verbose_name='form', choices=[('thing', 'thing'), ('theme', 'motif')])),
49 ('picture', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='areas', to='picture.Picture')),
53 bases=(models.Model,),