-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
511 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="Ballot", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
verbose_name="ID", | ||
serialize=False, | ||
auto_created=True, | ||
primary_key=True, | ||
), | ||
), | ||
("timestamp", models.DateTimeField(verbose_name=b"time voted")), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name="Choice", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
verbose_name="ID", | ||
serialize=False, | ||
auto_created=True, | ||
primary_key=True, | ||
), | ||
), | ||
("choice_text", models.CharField(max_length=200)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name="Poll", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
verbose_name="ID", | ||
serialize=False, | ||
auto_created=True, | ||
primary_key=True, | ||
), | ||
), | ||
("question", models.CharField(max_length=200)), | ||
("pub_date", models.DateTimeField(verbose_name=b"date published")), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name="Vote", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
verbose_name="ID", | ||
serialize=False, | ||
auto_created=True, | ||
primary_key=True, | ||
), | ||
), | ||
("ballot", models.ForeignKey(on_delete=models.CASCADE, to="approval_polls.Ballot")), | ||
("choice", models.ForeignKey(on_delete=models.CASCADE, to="approval_polls.Choice")), | ||
], | ||
), | ||
migrations.AddField( | ||
model_name="choice", | ||
name="poll", | ||
field=models.ForeignKey(on_delete=models.CASCADE, to="approval_polls.Poll"), | ||
), | ||
migrations.AddField( | ||
model_name="ballot", | ||
name="poll", | ||
field=models.ForeignKey(on_delete=models.CASCADE, blank=True, to="approval_polls.Poll", null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
("approval_polls", "0001_initial"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="poll", | ||
name="user", | ||
field=models.ForeignKey(on_delete=models.CASCADE, default=0, to=settings.AUTH_USER_MODEL), | ||
preserve_default=False, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
("approval_polls", "0002_poll_user"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="ballot", | ||
name="user", | ||
field=models.ForeignKey(on_delete=models.CASCADE, blank=True, to=settings.AUTH_USER_MODEL, null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("approval_polls", "0003_ballot_user"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="poll", | ||
name="vtype", | ||
field=models.IntegerField(default=2), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("approval_polls", "0004_poll_vtype"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="poll", | ||
name="close_date", | ||
field=models.DateTimeField( | ||
null=True, verbose_name=b"date closed", blank=True | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("approval_polls", "0005_poll_close_date"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="poll", | ||
name="show_close_date", | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("approval_polls", "0006_poll_show_close_date"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="poll", | ||
name="show_countdown", | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("approval_polls", "0007_poll_show_countdown"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="poll", | ||
name="show_write_in", | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("approval_polls", "0008_poll_show_write_in"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="poll", | ||
name="show_lead_color", | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
57 changes: 57 additions & 0 deletions
57
approval_polls/migrations/0010_voteinvitation_poll_is_private.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("approval_polls", "0009_poll_show_lead_color"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="VoteInvitation", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
verbose_name="ID", | ||
serialize=False, | ||
auto_created=True, | ||
primary_key=True, | ||
), | ||
), | ||
( | ||
"email", | ||
models.EmailField(max_length=254, verbose_name=b"voter email"), | ||
), | ||
( | ||
"sent_date", | ||
models.DateTimeField( | ||
null=True, verbose_name=b"invite sent on", blank=True | ||
), | ||
), | ||
( | ||
"key", | ||
models.CharField(unique=True, max_length=64, verbose_name=b"key"), | ||
), | ||
( | ||
"ballot", | ||
models.ForeignKey(on_delete=models.CASCADE, | ||
blank=True, to="approval_polls.Ballot", null=True | ||
), | ||
), | ||
], | ||
), | ||
migrations.AddField( | ||
model_name="poll", | ||
name="is_private", | ||
field=models.BooleanField(default=False), | ||
), | ||
migrations.AddField( | ||
model_name="voteinvitation", | ||
name="poll", | ||
field=models.ForeignKey(on_delete=models.CASCADE, to="approval_polls.Poll"), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("approval_polls", "0010_voteinvitation_poll_is_private"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="choice", | ||
name="choice_link", | ||
field=models.CharField(max_length=2048, null=True, blank=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
("approval_polls", "0011_choice_choice_link"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="Subscription", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
verbose_name="ID", | ||
serialize=False, | ||
auto_created=True, | ||
primary_key=True, | ||
), | ||
), | ||
("zipcode", models.CharField(max_length=5)), | ||
("user", models.ForeignKey(on_delete=models.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("approval_polls", "0012_subscription"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="poll", | ||
name="is_suspended", | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
Oops, something went wrong.