diff --git a/server/vb/migrations/0014_add_tool_to_contest.py b/server/vb/migrations/0014_add_tool_to_contest.py new file mode 100644 index 0000000..35f44b1 --- /dev/null +++ b/server/vb/migrations/0014_add_tool_to_contest.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.3 on 2024-05-21 17:43 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('vb', '0013_add_subdomains_flag'), + ] + + operations = [ + migrations.AddField( + model_name='contest', + name='tool', + field=models.CharField(choices=[('vote_america', 'Vote America'), ('rock_the_vote', 'Rock the Vote')], default='vote_america', max_length=32), + ), + ] diff --git a/server/vb/models.py b/server/vb/models.py index 81577f5..9aeda57 100644 --- a/server/vb/models.py +++ b/server/vb/models.py @@ -205,6 +205,13 @@ class ContestWorkflow(models.TextChoices): NONE = "none", "None" +class ContestTool(models.TextChoices): + """The registration tool for the contest.""" + + VOTE_AMERICA = "vote_america", "Vote America" + ROCK_THE_VOTE = "rock_the_vote", "Rock the Vote" + + class Contest(models.Model): """A single contest in the competition.""" @@ -219,6 +226,14 @@ class Contest(models.Model): start_at = models.DateTimeField(blank=False) end_at = models.DateTimeField(blank=False) + # We support running contests with different registration tools. + tool = models.CharField( + max_length=32, + choices=ContestTool.choices, + blank=False, + default=ContestTool.VOTE_AMERICA, + ) + # The assumptions here have changed basically weekly as we gather more # data and learn more. As of this writing, our current assumptions are: #