make larger text in forms
[wolnelektury.git] / src / picture / migrations / 0001_initial.py
1 # -*- coding: utf-8 -*-
2 from __future__ import unicode_literals
3
4 from os.path import join
5 from django.conf import settings
6 from django.db import models, migrations
7 import sorl.thumbnail.fields
8 import jsonfield.fields
9 import django.core.files.storage
10 from django.utils.encoding import force_bytes
11
12
13 class Migration(migrations.Migration):
14
15     dependencies = [
16     ]
17
18     operations = [
19         migrations.CreateModel(
20             name='Picture',
21             fields=[
22                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
23                 ('title', models.CharField(max_length=120, verbose_name='Title')),
24                 ('slug', models.SlugField(unique=True, max_length=120, verbose_name='Slug')),
25                 ('sort_key', models.CharField(verbose_name='Sort key', max_length=120, editable=False, db_index=True)),
26                 ('sort_key_author', models.CharField(default='', verbose_name='sort key by author', max_length=120, editable=False, db_index=True)),
27                 ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='creation date', db_index=True)),
28                 ('changed_at', models.DateTimeField(auto_now=True, verbose_name='creation date', db_index=True)),
29                 ('xml_file', models.FileField(upload_to=b'xml', storage=django.core.files.storage.FileSystemStorage(base_url=b'/media/pictures/', location=join(force_bytes(settings.MEDIA_ROOT), b'pictures')), verbose_name=b'xml_file')),
30                 ('image_file', sorl.thumbnail.fields.ImageField(upload_to=b'images', storage=django.core.files.storage.FileSystemStorage(base_url=b'/media/pictures/', location=join(force_bytes(settings.MEDIA_ROOT), b'pictures')), verbose_name='image_file')),
31                 ('html_file', models.FileField(upload_to=b'html', storage=django.core.files.storage.FileSystemStorage(base_url=b'/media/pictures/', location=join(force_bytes(settings.MEDIA_ROOT), b'pictures')), verbose_name=b'html_file')),
32                 ('areas_json', jsonfield.fields.JSONField(default={}, verbose_name='picture areas JSON', editable=False)),
33                 ('extra_info', jsonfield.fields.JSONField(default={}, verbose_name='Additional information')),
34                 ('culturepl_link', models.CharField(max_length=240, blank=True)),
35                 ('wiki_link', models.CharField(max_length=240, blank=True)),
36                 ('_related_info', jsonfield.fields.JSONField(null=True, editable=False, blank=True)),
37                 ('width', models.IntegerField(null=True)),
38                 ('height', models.IntegerField(null=True)),
39             ],
40             options={
41                 'ordering': ('sort_key',),
42                 'verbose_name': 'picture',
43                 'verbose_name_plural': 'pictures',
44             },
45             bases=(models.Model,),
46         ),
47         migrations.CreateModel(
48             name='PictureArea',
49             fields=[
50                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
51                 ('area', jsonfield.fields.JSONField(default={}, verbose_name='area', editable=False)),
52                 ('kind', models.CharField(db_index=True, max_length=10, verbose_name='form', choices=[(b'thing', 'thing'), (b'theme', 'motif')])),
53                 ('picture', models.ForeignKey(related_name=b'areas', to='picture.Picture')),
54             ],
55             options={
56             },
57             bases=(models.Model,),
58         ),
59     ]