1 from django.db import models, migrations
2 import django.db.models.deletion
5 class Migration(migrations.Migration):
8 ('polls', '0001_initial'),
9 ('catalogue', '0001_initial'),
13 migrations.CreateModel(
16 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
17 ('name', models.CharField(max_length=127, verbose_name='name', blank=True)),
18 ('email', models.EmailField(db_index=True, max_length=75, verbose_name='email', blank=True)),
19 ('amount', models.DecimalField(verbose_name='amount', max_digits=10, decimal_places=2)),
20 ('payed_at', models.DateTimeField(db_index=True, null=True, verbose_name='payed at', blank=True)),
21 ('language_code', models.CharField(max_length=2, null=True, blank=True)),
22 ('notifications', models.BooleanField(default=True, db_index=True, verbose_name='notifications')),
23 ('notify_key', models.CharField(max_length=32)),
26 'ordering': ['-payed_at'],
27 'verbose_name': 'funding',
28 'verbose_name_plural': 'fundings',
30 bases=(models.Model,),
32 migrations.CreateModel(
35 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
36 ('author', models.CharField(max_length=255, verbose_name='author')),
37 ('title', models.CharField(max_length=255, verbose_name='Title')),
38 ('slug', models.SlugField(verbose_name='Slug')),
39 ('description', models.TextField(verbose_name='Description', blank=True)),
40 ('target', models.DecimalField(verbose_name='target', max_digits=10, decimal_places=2)),
41 ('start', models.DateField(verbose_name='start', db_index=True)),
42 ('end', models.DateField(verbose_name='end', db_index=True)),
43 ('redakcja_url', models.URLField(verbose_name='redakcja URL', blank=True)),
44 ('cover', models.ImageField(upload_to='funding/covers', verbose_name='Cover')),
45 ('notified_near', models.DateTimeField(null=True, verbose_name='Near-end notifications sent', blank=True)),
46 ('notified_end', models.DateTimeField(null=True, verbose_name='End notifications sent', blank=True)),
47 ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, blank=True, to='catalogue.Book', help_text='Published book.', null=True)),
48 ('poll', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to='polls.Poll', help_text='Poll', null=True)),
52 'verbose_name': 'offer',
53 'verbose_name_plural': 'offers',
55 bases=(models.Model,),
57 migrations.CreateModel(
60 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
61 ('price', models.DecimalField(verbose_name='price', max_digits=10, decimal_places=2)),
62 ('name', models.CharField(max_length=255, verbose_name='name')),
63 ('long_name', models.CharField(max_length=255, verbose_name='long name')),
64 ('end_date', models.DateField(null=True, verbose_name='end date', blank=True)),
65 ('offer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='offer', blank=True, to='funding.Offer', null=True)),
68 'ordering': ['-price'],
69 'verbose_name': 'perk',
70 'verbose_name_plural': 'perks',
72 bases=(models.Model,),
74 migrations.CreateModel(
77 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
78 ('amount', models.DecimalField(verbose_name='amount', max_digits=10, decimal_places=2)),
79 ('timestamp', models.DateField(verbose_name='when')),
80 ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalogue.Book')),
83 'ordering': ['-timestamp'],
84 'verbose_name': 'money spent on a book',
85 'verbose_name_plural': 'money spent on books',
87 bases=(models.Model,),
92 field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='offer', to='funding.Offer'),
93 preserve_default=True,
98 field=models.ManyToManyField(to='funding.Perk', verbose_name='perks', blank=True),
99 preserve_default=True,