Fix ugly picture theme lists.
[wolnelektury.git] / src / contact / migrations / 0001_initial.py
1 from django.db import migrations, models
2 import django.db.models.deletion
3 import jsonfield.fields
4
5
6 class Migration(migrations.Migration):
7
8     dependencies = [
9     ]
10
11     operations = [
12         migrations.CreateModel(
13             name='Attachment',
14             fields=[
15                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
16                 ('tag', models.CharField(max_length=64)),
17                 ('file', models.FileField(upload_to='contact/attachment')),
18             ],
19         ),
20         migrations.CreateModel(
21             name='Contact',
22             fields=[
23                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
24                 ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='submission date')),
25                 ('ip', models.GenericIPAddressField(verbose_name='IP address')),
26                 ('contact', models.EmailField(max_length=128, verbose_name='contact')),
27                 ('form_tag', models.CharField(max_length=32, verbose_name='form', db_index=True)),
28                 ('body', jsonfield.fields.JSONField(verbose_name='body')),
29             ],
30             options={
31                 'ordering': ('-created_at',),
32                 'verbose_name': 'submitted form',
33                 'verbose_name_plural': 'submitted forms',
34             },
35         ),
36         migrations.AddField(
37             model_name='attachment',
38             name='contact',
39             field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contact.Contact'),
40         ),
41     ]