Branch 'develop' - 2 commits - fedora_elections/models.py
by Pierre-YvesChibon
fedora_elections/models.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
New commits:
commit 1865d4f6da417788f85af6481e87922f9615d639
Merge: 996c4ea 065f677
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu May 21 17:37:11 2015 +0200
Merge pull request #46 from fedora-infra/fix_resultspage
Fix setting the max_vote value in the stats dict for the results page
commit 065f6779977b1531f686c88df945ab3233321de9
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu May 21 16:21:59 2015 +0200
Fix setting the max_vote value in the stats dict for the results page
diff --git a/fedora_elections/models.py b/fedora_elections/models.py
index 8f80914..dff7cc4 100644
--- a/fedora_elections/models.py
+++ b/fedora_elections/models.py
@@ -414,14 +414,12 @@ class Vote(BASE):
stats['candidate_voters'] = candidate_voters
stats['n_candidates'] = cnt
- if election.voting_type in ['range', 'select']:
+ stats['max_vote'] = 1
+ if election.voting_type == 'select' \
+ or election.voting_type.startswith('range'):
stats['max_vote'] = cnt
if election.max_votes:
stats['max_vote'] = election.max_votes
- elif election.voting_type == 'simple':
- stats['max_vote'] = 1
- elif election.voting_type == 'irc':
- stats['max_vote'] = 1
dates = election = session.query(
Vote.timestamp
8 years, 11 months
Branch 'develop' - 2 commits - fedora_elections/templates
by Pierre-YvesChibon
fedora_elections/templates/vote_range.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 996c4ea9b0b38b75ae98fe1af1928cd3c229f0b2
Merge: a247838 6daddbe
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue May 5 15:58:25 2015 +0200
Merge pull request #45 from fedora-infra/fix_doc
Fix displaying information about the simplified range voting method
commit 6daddbeb249b99b3bab3b9255a6eb7f9ef5f5a4e
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue May 5 14:28:23 2015 +0200
Fix displaying information about the simplified range voting method
diff --git a/fedora_elections/templates/vote_range.html b/fedora_elections/templates/vote_range.html
index 141259e..d8f3458 100644
--- a/fedora_elections/templates/vote_range.html
+++ b/fedora_elections/templates/vote_range.html
@@ -72,7 +72,7 @@
<a href="http://rangevoting.org/">Center for Range Voting</a>.
</p>
</div>
-{% elif election.voting_type == 'range_3' %}
+{% elif election.voting_type == 'range_simple' %}
<div>
<h2>Information on Simplified Range Voting</h2>
<p>
8 years, 12 months
Branch 'develop' - 4 commits - fedora_elections/elections.py fedora_elections/forms.py fedora_elections/__init__.py files/fedora-elections.spec
by Pierre-YvesChibon
fedora_elections/__init__.py | 2 +-
fedora_elections/elections.py | 2 +-
fedora_elections/forms.py | 2 +-
files/fedora-elections.spec | 6 +++++-
4 files changed, 8 insertions(+), 4 deletions(-)
New commits:
commit a24783841a20b1d4a40e32aba7070553b60d2bce
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue May 5 13:58:31 2015 +0200
Release 2.5.3
diff --git a/fedora_elections/__init__.py b/fedora_elections/__init__.py
index 0e7fe48..4e6273c 100644
--- a/fedora_elections/__init__.py
+++ b/fedora_elections/__init__.py
@@ -24,7 +24,7 @@
# Pierre-Yves Chibon <pingou(a)fedoraproject.org>
#
-__version__ = '2.5.2'
+__version__ = '2.5.3'
import logging
import os
diff --git a/files/fedora-elections.spec b/files/fedora-elections.spec
index cdd1237..96660d9 100644
--- a/files/fedora-elections.spec
+++ b/files/fedora-elections.spec
@@ -1,7 +1,7 @@
%define modname fedora_elections
Name: fedora-elections
-Version: 2.5.2
+Version: 2.5.3
Release: 1%{?dist}
Summary: Fedora elections application
@@ -111,6 +111,10 @@ install -m 644 files/update_1_to_2.sql \
%changelog
+* Tue May 05 2015 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 2.5.3-1
+- Update to 2.5.3
+- Fix the simplified range voting
+
* Wed Apr 29 2015 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 2.5.2-1
- Update to 2.5.2
- Make elections prettier on high resolution displays
commit 38f9d277cffa535a96aeedb9b3ee7c302226361d
Merge: d4b11b7 ad14d7c
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue May 5 14:00:44 2015 +0200
Merge pull request #44 from fedora-infra/fix_range_voting
Fix simplified range voting
commit ad14d7c3a4f40efed011c1f1ddb88c75f0095783
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue May 5 13:52:46 2015 +0200
Rename range_3 to range_simple as it can offer a wider range than 3
diff --git a/fedora_elections/forms.py b/fedora_elections/forms.py
index 2603973..7d04a90 100644
--- a/fedora_elections/forms.py
+++ b/fedora_elections/forms.py
@@ -34,7 +34,7 @@ class ElectionForm(wtf.Form):
choices=[
('range', 'Range Voting'),
('simple', 'Simple Voting (choose one candidate in the list)'),
- ('range_3', 'Simplified Range Voting (max is set below)'),
+ ('range_simple', 'Simplified Range Voting (max is set below)'),
('select', 'Select Voting (checkboxes for each candidate, '
'maximum number of votes set below)'),
('irc', '+1/0/-1 voting'),
commit e1a1b789821b17ac2b0b1b8d319e3b37f422b5e1
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue May 5 13:52:27 2015 +0200
Use vote_range() for both normal and simplified range voting
diff --git a/fedora_elections/elections.py b/fedora_elections/elections.py
index b04ee69..d46db72 100644
--- a/fedora_elections/elections.py
+++ b/fedora_elections/elections.py
@@ -112,7 +112,7 @@ def vote(election_alias):
flask.flash('You have already voted in the election!')
return safe_redirect_back()
- if election.voting_type == 'range':
+ if election.voting_type.startswith('range'):
return vote_range(election)
elif election.voting_type == 'simple':
return vote_simple(election)
8 years, 12 months
Changes to 'refs/tags/2.5.3'
by Pierre-YvesChibon
Tag '2.5.3' created by Pierre-Yves Chibon <pingou(a)pingoured.fr> at 2015-05-05 12:02 +0000
Release 2.5.3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEABECAAYFAlVIsUsACgkQ2HRbBxDocwoV/ACfYwk2kFSnC3Iev4Ff3Xfd95hG
E8gAoJh1cDN5su/SFOkVuNjKOZCYc+fW
=fnHC
-----END PGP SIGNATURE-----
Changes since 2.5.2:
Pierre-Yves Chibon (4):
Use vote_range() for both normal and simplified range voting
Rename range_3 to range_simple as it can offer a wider range than 3
Merge pull request #44 from fedora-infra/fix_range_voting
Release 2.5.3
---
fedora_elections/__init__.py | 2 +-
fedora_elections/elections.py | 2 +-
fedora_elections/forms.py | 2 +-
files/fedora-elections.spec | 6 +++++-
4 files changed, 8 insertions(+), 4 deletions(-)
---
8 years, 12 months
4 commits - fedora_elections/elections.py fedora_elections/forms.py fedora_elections/__init__.py files/fedora-elections.spec
by Pierre-YvesChibon
fedora_elections/__init__.py | 2 +-
fedora_elections/elections.py | 2 +-
fedora_elections/forms.py | 2 +-
files/fedora-elections.spec | 6 +++++-
4 files changed, 8 insertions(+), 4 deletions(-)
New commits:
commit a24783841a20b1d4a40e32aba7070553b60d2bce
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue May 5 13:58:31 2015 +0200
Release 2.5.3
diff --git a/fedora_elections/__init__.py b/fedora_elections/__init__.py
index 0e7fe48..4e6273c 100644
--- a/fedora_elections/__init__.py
+++ b/fedora_elections/__init__.py
@@ -24,7 +24,7 @@
# Pierre-Yves Chibon <pingou(a)fedoraproject.org>
#
-__version__ = '2.5.2'
+__version__ = '2.5.3'
import logging
import os
diff --git a/files/fedora-elections.spec b/files/fedora-elections.spec
index cdd1237..96660d9 100644
--- a/files/fedora-elections.spec
+++ b/files/fedora-elections.spec
@@ -1,7 +1,7 @@
%define modname fedora_elections
Name: fedora-elections
-Version: 2.5.2
+Version: 2.5.3
Release: 1%{?dist}
Summary: Fedora elections application
@@ -111,6 +111,10 @@ install -m 644 files/update_1_to_2.sql \
%changelog
+* Tue May 05 2015 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 2.5.3-1
+- Update to 2.5.3
+- Fix the simplified range voting
+
* Wed Apr 29 2015 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 2.5.2-1
- Update to 2.5.2
- Make elections prettier on high resolution displays
commit 38f9d277cffa535a96aeedb9b3ee7c302226361d
Merge: d4b11b7 ad14d7c
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue May 5 14:00:44 2015 +0200
Merge pull request #44 from fedora-infra/fix_range_voting
Fix simplified range voting
commit ad14d7c3a4f40efed011c1f1ddb88c75f0095783
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue May 5 13:52:46 2015 +0200
Rename range_3 to range_simple as it can offer a wider range than 3
diff --git a/fedora_elections/forms.py b/fedora_elections/forms.py
index 2603973..7d04a90 100644
--- a/fedora_elections/forms.py
+++ b/fedora_elections/forms.py
@@ -34,7 +34,7 @@ class ElectionForm(wtf.Form):
choices=[
('range', 'Range Voting'),
('simple', 'Simple Voting (choose one candidate in the list)'),
- ('range_3', 'Simplified Range Voting (max is set below)'),
+ ('range_simple', 'Simplified Range Voting (max is set below)'),
('select', 'Select Voting (checkboxes for each candidate, '
'maximum number of votes set below)'),
('irc', '+1/0/-1 voting'),
commit e1a1b789821b17ac2b0b1b8d319e3b37f422b5e1
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue May 5 13:52:27 2015 +0200
Use vote_range() for both normal and simplified range voting
diff --git a/fedora_elections/elections.py b/fedora_elections/elections.py
index b04ee69..d46db72 100644
--- a/fedora_elections/elections.py
+++ b/fedora_elections/elections.py
@@ -112,7 +112,7 @@ def vote(election_alias):
flask.flash('You have already voted in the election!')
return safe_redirect_back()
- if election.voting_type == 'range':
+ if election.voting_type.startswith('range'):
return vote_range(election)
elif election.voting_type == 'simple':
return vote_simple(election)
8 years, 12 months