Fixes #4076: Recommendations from collections.
[wolnelektury.git] / src / polls / migrations / 0001_initial.py
1 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
3 #
4 from django.db import models, migrations
5 import django.db.models.deletion
6
7
8 class Migration(migrations.Migration):
9
10     dependencies = [
11     ]
12
13     operations = [
14         migrations.CreateModel(
15             name='Poll',
16             fields=[
17                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
18                 ('question', models.TextField(verbose_name='question')),
19                 ('slug', models.SlugField(verbose_name='Slug')),
20                 ('open', models.BooleanField(default=False, verbose_name='open')),
21             ],
22             options={
23                 'verbose_name': 'Poll',
24                 'verbose_name_plural': 'Polls',
25             },
26             bases=(models.Model,),
27         ),
28         migrations.CreateModel(
29             name='PollItem',
30             fields=[
31                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
32                 ('content', models.TextField(verbose_name='content')),
33                 ('vote_count', models.IntegerField(default=0, verbose_name='vote count')),
34                 ('poll', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='polls.Poll')),
35             ],
36             options={
37                 'verbose_name': 'vote item',
38                 'verbose_name_plural': 'vote items',
39             },
40             bases=(models.Model,),
41         ),
42     ]