-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature to send email to selected set of board members for voting. Voting expires in 10 days from the time of request and user can vote only once. Required validations are added. Added 2 new models to store url hash and capture votes submitted.
- Loading branch information
Showing
11 changed files
with
625 additions
and
7 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
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,19 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('nominations', '0003_nominationtype_description'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='nominationtype', | ||
name='description', | ||
field=models.TextField(verbose_name='Description about nomination', default=''), | ||
), | ||
] |
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,53 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
from django.conf import settings | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('nominations', '0004_auto_20160729_0933'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='UserVoting', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)), | ||
('created_at', models.DateTimeField(auto_now_add=True)), | ||
('updated_at', models.DateTimeField(auto_now=True)), | ||
('comments', models.TextField()), | ||
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), | ||
('vote', models.ForeignKey(to='nominations.Nomination')), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
bases=(models.Model,), | ||
), | ||
migrations.CreateModel( | ||
name='VotingURL', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)), | ||
('created_at', models.DateTimeField(auto_now_add=True)), | ||
('updated_at', models.DateTimeField(auto_now=True)), | ||
('url_hash', models.CharField(max_length=32, verbose_name='hash', unique=True)), | ||
('expiry', models.DateTimeField(verbose_name='Expiry')), | ||
('ntype', models.ForeignKey(to='nominations.NominationType')), | ||
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
bases=(models.Model,), | ||
), | ||
migrations.AddField( | ||
model_name='uservoting', | ||
name='voting_url', | ||
field=models.ForeignKey(to='nominations.VotingURL'), | ||
preserve_default=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
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
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
Oops, something went wrong.