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