[Fedora Elections] #44: Rework FAS integration
by fedora-badges
#44: Rework FAS integration
-------------------------+-----------------------------
Reporter: pingou | Owner: nigelj
Type: enhancement | Status: new
Priority: major | Milestone: Future Release
Component: General | Version:
Keywords: | Blocked By:
Blocking: |
-------------------------+-----------------------------
At the moment we keep the user's FAS name in memcached but this is not
working so well and quite ofte we're stuck or very slow.
What we could do is add a new table or a new field in the candidate table,
to store locally the FAS name.
This way, when we add/edit candidates, we would query FAS for their name,
store it locally and forget about memcached.
--
Ticket URL: <https://fedorahosted.org/elections/ticket/44>
Fedora Elections <https://fedorahosted.org/elections/>
Fedora Elections
7 years, 2 months
tests/__init__.py
by Pierre-YvesChibon
tests/__init__.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 995fbe600d8421b8a9c21677e6d4ea0defc04a30
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue Aug 4 15:30:48 2015 +0200
Adjust the faitout url to the new address
diff --git a/tests/__init__.py b/tests/__init__.py
index 08c6833..eecfc4a 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -49,7 +49,8 @@ from fedora_elections import models
DB_PATH = 'sqlite:///:memory:'
-FAITOUT_URL = 'http://209.132.184.152/faitout/'
+FAITOUT_URL = 'http://faitout.fedorainfracloud.org/'
+
if os.environ.get('BUILD_ID'):
try:
import requests
8 years, 9 months
Changes to 'refs/tags/2.5.4'
by Pierre-YvesChibon
Tag '2.5.4' created by Pierre-Yves Chibon <pingou(a)pingoured.fr> at 2015-05-28 09:27 +0000
Release 2.5.4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEABECAAYFAlVm34cACgkQ2HRbBxDocwpRDQCfZMHsJr8QAfPKXCVPZmovjB9K
z20An3auuivvvZlV/Bc4SyWomURrc4sf
=jaBE
-----END PGP SIGNATURE-----
Changes since 2.5.3:
Pierre-Yves Chibon (5):
Fix displaying information about the simplified range voting method
Merge pull request #45 from fedora-infra/fix_doc
Fix setting the max_vote value in the stats dict for the results page
Merge pull request #46 from fedora-infra/fix_resultspage
Release 2.5.4
---
fedora_elections/__init__.py | 2 +-
fedora_elections/models.py | 8 +++-----
fedora_elections/templates/vote_range.html | 2 +-
files/fedora-elections.spec | 7 ++++++-
4 files changed, 11 insertions(+), 8 deletions(-)
---
8 years, 9 months
3 commits - fedora_elections/__init__.py fedora_elections/models.py fedora_elections/templates files/fedora-elections.spec
by Pierre-YvesChibon
fedora_elections/__init__.py | 2 +-
fedora_elections/models.py | 8 +++-----
fedora_elections/templates/vote_range.html | 2 +-
files/fedora-elections.spec | 7 ++++++-
4 files changed, 11 insertions(+), 8 deletions(-)
New commits:
commit 656282c5e9514c103779f7a8891d4a9f3263191b
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu May 28 11:27:16 2015 +0200
Release 2.5.4
diff --git a/fedora_elections/__init__.py b/fedora_elections/__init__.py
index 4e6273c..c08a61c 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.3'
+__version__ = '2.5.4'
import logging
import os
diff --git a/files/fedora-elections.spec b/files/fedora-elections.spec
index 96660d9..1fa4d0f 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.3
+Version: 2.5.4
Release: 1%{?dist}
Summary: Fedora elections application
@@ -111,6 +111,11 @@ install -m 644 files/update_1_to_2.sql \
%changelog
+* Thu May 28 2015 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 2.5.4-1
+- Update to 2.5.4
+- Fix displaying information about the simplified range voting method
+- Fix setting the max_vote value in the stats dict for the results page
+
* 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
commit b1faa6e51e4d527f46cf67a8e4e385a4fde39d44
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
commit d84a4e90c8f1bf8325b7a112f101080bfef2fb90
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, 9 months