Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2021 Release #2

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gingerhouse/houses/forms.py
Original file line number Diff line number Diff line change
@@ -14,9 +14,9 @@ def __init__(self, *args, **kwargs):

def clean(self):
cleaned_data = self.cleaned_data
# is there a vote with this email to same house category?
# is there a vote with this email on this entry already?
email = cleaned_data.get("email")
already_voted = Vote.objects.filter(email=email, ginger_house__category=self.ginger_house.category).exists()
already_voted = Vote.objects.filter(email=email, ginger_house=self.ginger_house).exists()
if already_voted:
raise forms.ValidationError("You have already voted in this category")
raise forms.ValidationError("You have already voted for this entry")
return cleaned_data
4 changes: 2 additions & 2 deletions gingerhouse/templates/houses/index.html
Original file line number Diff line number Diff line change
@@ -36,12 +36,12 @@ <h3>In Benefit of <span class="peach">community giving fund's emergency housing
<div class="row">
<div class="col-md-6">
<div class="ginger-bread vertical-align">
<h3 class="white">Tap Gingerbread house to vote</h3>
<h3 class="white">Tap Gingerbread house to see more and vote</h3>
</div>
</div>
<div class="col-md-6 vertical-align vote">
<h1 class="peach">
You may vote once in each category
Vote for as many entries as you like, one vote per entry.
</h1>
</div>
</div>