fedora_elections/__init__.py | 13 +++----------
fedora_elections/templates/about.html | 2 +-
fedora_elections/templates/admin/election_form.html | 2 +-
fedora_elections/templates/results.html | 2 +-
files/fedora-elections.spec | 13 +++++++++++--
requirements.txt | 1 +
6 files changed, 18 insertions(+), 15 deletions(-)
New commits:
commit cafb4b2d332fb37e5d0c603f6ecbe75967c38f6c
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu Nov 20 16:16:03 2014 +0100
Release 2.4.1
diff --git a/fedora_elections/__init__.py b/fedora_elections/__init__.py
index 9b15597..adff683 100644
--- a/fedora_elections/__init__.py
+++ b/fedora_elections/__init__.py
@@ -24,7 +24,7 @@
# Pierre-Yves Chibon <pingou(a)fedoraproject.org>
#
-__version__ = '2.4'
+__version__ = '2.4.1'
import os
diff --git a/files/fedora-elections.spec b/files/fedora-elections.spec
index c8ab8ce..e159b06 100644
--- a/files/fedora-elections.spec
+++ b/files/fedora-elections.spec
@@ -1,7 +1,7 @@
%define modname fedora_elections
Name: fedora-elections
-Version: 2.4
+Version: 2.4.1
Release: 1%{?dist}
Summary: Fedora elections application
@@ -111,6 +111,15 @@ install -m 644 files/update_1_to_2.sql \
%changelog
+* Thu Nov 20 2014 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 2.4.1-1
+- Update to 2.4.1
+- Adjust the election form to inform the user that cla_done is always required
+ to vote (Patrick Uiterwijk)
+- Fix the display of the name retrieved from FAS in the result page
+- Make the about page rely on the cached information
+- Add blinker to the list of deps in the requirements.txt for the unit-tests
+ to pass on jenkins
+
* Thu Nov 20 2014 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 2.4-1
- Update to 2.4
- Fix the election creation/edit page to show all the labels
@@ -120,7 +129,7 @@ install -m 644 files/update_1_to_2.sql \
email with the results
- Add new election type: IRC allowing users to do +1/0/-1 votes
- Add session time-out
-- Add caching for the information retrieved from FAS
+- Add caching for the information retrieved from FAS (Ralph Bean)
- Add python-dogpile-cache as BR and R
* Wed Jul 16 2014 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 2.3-1
commit 8a2fd24986c314ec5f08b1d1d30169e44ae2a10c
Merge: 043232e 1c5d618
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu Nov 20 16:08:12 2014 +0100
Merge pull request #38 from fedora-infra/fix_caching
Fix caching
commit 043232e4cfe4a5cce8aeb46cc5e9be7dd9e6d1da
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu Nov 20 13:41:11 2014 +0100
Add blinker to the list of dependencies as it's required for the unit-tests
diff --git a/requirements.txt b/requirements.txt
index a62a392..4810410 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -10,3 +10,4 @@ python-openid-teams
SQLAlchemy
wtforms
dogpile.cache
+blinker # required by Flask for the unit-tests (for signaling)
commit 8aa198f9cfc1e72fa15b6ed1bba168e1308244e4
Merge: cd97446 1148bd3
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu Nov 20 13:39:57 2014 +0100
Merge pull request #37 from fedora-infra/fix-cla-done-ui
Explain the CLA-done is always required
commit 1c5d618971da5e617cb9224f8546cbb8329fc3bc
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu Nov 20 13:11:21 2014 +0100
Let the about page of an election use the cached information
diff --git a/fedora_elections/__init__.py b/fedora_elections/__init__.py
index 157a435..9b15597 100644
--- a/fedora_elections/__init__.py
+++ b/fedora_elections/__init__.py
@@ -68,6 +68,7 @@ from fedora_elections import forms
cache = dogpile.cache.make_region()
cache.configure(**APP.config['DOGPILE_CACHE'])
+from fedora_elections.utils import build_name_map
def is_authenticated():
@@ -208,15 +209,7 @@ def about_election(election_alias):
flask.flash('The election, %s, does not exist.' % election_alias)
return safe_redirect_back()
- usernamemap = {}
- if (election.candidates_are_fasusers): # pragma: no cover
- for candidate in election.candidates:
- try:
- usernamemap[candidate.id] = \
- FAS2.person_by_username(candidate.name)['human_name']
- except (KeyError, AuthError):
- # User has their name set to private or user doesn't exist.
- usernamemap[candidate.id] = candidate.name
+ usernamemap = build_name_map(election)
return flask.render_template(
'about.html',
diff --git a/fedora_elections/templates/about.html
b/fedora_elections/templates/about.html
index e2008ff..aaca52a 100644
--- a/fedora_elections/templates/about.html
+++ b/fedora_elections/templates/about.html
@@ -15,7 +15,7 @@
<tr>
<td>
{% if election.candidates_are_fasusers %}
- {{ usernamemap[candidate.id] }}
+ {{ usernamemap['%s' % candidate.id] }}
{% else %}
{{ candidate.name }}
{% endif %}
commit 888bbdf728ce454a2399a4cbe59a5a8d3ffd617a
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu Nov 20 13:10:54 2014 +0100
Fix displaying the real name retrieved from FAS present inthe usernamemap
diff --git a/fedora_elections/templates/results.html
b/fedora_elections/templates/results.html
index 435073b..f8cc334 100644
--- a/fedora_elections/templates/results.html
+++ b/fedora_elections/templates/results.html
@@ -38,7 +38,7 @@
<tr class="{% if lastrow == True %}firstout{% endif %} {{
loop.cycle('row_odd', 'row_even') }}">
<td>
{% if election.candidates_are_fasusers %}
- {{ usernamemap[candidate.id] }}
+ {{ usernamemap['%s' % candidate.id] }}
{% else %}
{{candidate.name}}
{% endif %}
commit 1148bd3d2b6229a241901d8ddff55162e0d31d45
Author: Patrick Uiterwijk <puiterwijk(a)redhat.com>
Date: Tue Nov 18 13:57:44 2014 +0100
Explain the CLA-done is always required
diff --git a/fedora_elections/templates/admin/election_form.html
b/fedora_elections/templates/admin/election_form.html
index a3dcde8..eea64b3 100644
--- a/fedora_elections/templates/admin/election_form.html
+++ b/fedora_elections/templates/admin/election_form.html
@@ -22,7 +22,7 @@
{{ render_field_in_row(form.seats_elected) }}
{{ render_field_in_row(form.candidates_are_fasusers) }}
{{ render_field_in_row(form.embargoed) }}
- {{ render_field_in_row(form.lgl_voters, after="FAS groups allowed to vote on
this election") }}
+ {{ render_field_in_row(form.lgl_voters, after="FAS groups allowed to vote on
this election (CLA-done is always required)") }}
{{ render_field_in_row(form.admin_grp, after="FAS groups allowed to view the
result despite the embargo") }}
</table>
</fieldset>
Show replies by date