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

update to upstream/master #61

Open
wants to merge 232 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
232 commits
Select commit Hold shift + click to select a range
a89de7a
View voter list as it is in voter file upload
edmarmartineli May 11, 2017
1bfc247
Display the login type again.
edmarmartineli May 29, 2017
112d035
Merge branch 'master' into list_vote
edmarmartineli May 30, 2017
e5492aa
Returning to the source fixed-size fonts
edmarmartineli May 31, 2017
21ec295
Merge branch 'list_vote' of https://github.com/edmarmartineli/helios-…
edmarmartineli May 31, 2017
04ad8df
hsts upgrade
benadida Oct 27, 2017
cd45061
1 year hsts for real
benadida Oct 27, 2017
47612a4
upgrade kombu
benadida Oct 27, 2017
3e3424a
hsts
benadida Oct 27, 2017
c7d1a19
Add a proper label you can easily make selections.
jfly Dec 8, 2017
2712a2f
Use syntax from new django-webtest package. Fixes issue #8
Dec 14, 2017
ce3e0f6
require SSL on postgres
benadida Feb 2, 2018
4dea861
Updated psycopg2 version to latest
millosolomillo Feb 3, 2018
2ede468
Merge pull request #187 from millosolomillo/patch-1
benadida Feb 4, 2018
0b7da7a
Merge pull request #189 from openSUSE/master
benadida Feb 8, 2018
cc2c02e
Admin is extracted from ENV
millosolomillo Feb 17, 2018
41e5611
Merge pull request #1 from benadida/master
millosolomillo Feb 17, 2018
b07b60c
Make cast vote email a template
shirlei Mar 19, 2018
cc5764b
Catch non json results when verifying election
shirlei May 30, 2018
e3a39f2
Alter request.REQUEST to request.GET
shirlei Jun 8, 2018
6b6b63a
Fix to consider request.POST or request.GET
shirlei Jul 20, 2018
74a7128
upgrade gunicorn
benadida Jul 23, 2018
43f9d84
Merge pull request #196 from shirlei/catch_error_when_verifying_priva…
benadida Jul 23, 2018
248583b
Merge pull request #194 from shirlei/cast_vote_email_as_a_template
benadida Jul 23, 2018
ac5af71
upgrade python
benadida Jul 23, 2018
e3fe4db
upgrading to heroku-16
benadida Jul 23, 2018
ceef21b
Remove spurious comment
shirlei Jul 23, 2018
d7b0dfd
Merge pull request #184 from jfly/add-proper-label
benadida Jul 23, 2018
69b37f1
Merge pull request #156 from edmarmartineli/list_vote
benadida Jul 23, 2018
1a1df57
Merge pull request #200 from shirlei/RemovedInDjango19Warning_request…
benadida Jul 24, 2018
d25f9dd
Show election help email address to election administrator, start and
edmarmartineli Jul 27, 2018
8e49ea8
Show start and end voting date to voters in invitation email.
edmarmartineli Jul 31, 2018
dcb0a04
correct # of votes
benadida Dec 11, 2018
75c25e0
Tweak style for textarea size
shirlei Jan 24, 2019
0fedbc5
Show trustee key in a textarea instead of open tab
shirlei Jan 24, 2019
0918cda
updated software versions
benadida Jan 27, 2019
2482fb3
added workaround for gce for travis as per https://github.com/travis-…
benadida Jan 27, 2019
db18573
Merge pull request #212 from benadida/fix-travis
benadida Jan 27, 2019
28808c9
Merge pull request #211 from shirlei/fix-not-allowed-navigate-top-frame
benadida Jan 27, 2019
ba3c7e6
Remove unused import causing deprecation warning
shirlei Jan 28, 2019
451b6b8
Merge pull request #213 from shirlei/remove_RemovedInDjango19Warning_…
benadida Jan 29, 2019
0677659
upgrade google APIs
benadida Jan 29, 2019
d89222d
Ignore .idea folder
McCio Feb 17, 2019
c7a3a2d
Do not try to run more commands if any fails
McCio Feb 17, 2019
646e60f
import and serve only enabled auth systems urls
McCio Feb 17, 2019
be8c042
Prevent trustee enumeration by returning the same 404 error both if t…
McCio Feb 17, 2019
1437817
Add missing import
McCio Feb 17, 2019
e57413f
Dispatch worker method explicitly
McCio Feb 17, 2019
388891c
Reduce cluttering and overlapping on imports
McCio Feb 17, 2019
87c5f9d
[DJ1.11] Use a dict instead of django.template.Context
McCio Feb 18, 2019
982dabb
[Travis] update travis badge to match current branch
McCio Feb 18, 2019
fb7f98f
[Travis] Emit all warnings during tests
McCio Feb 18, 2019
16a6de5
[DJ1.9] Remove warning of not declaring explicit app_label
McCio Nov 25, 2017
204e364
Merge branch 'mccio/auth-improve' into django-1.11
McCio Feb 18, 2019
fb77fd1
[DJ1.10] list of urlpatterns is a list of url() instead of a patterns…
McCio Feb 18, 2019
97418e6
[DJ1.10] Support for string view arguments to url() will be removed
McCio Feb 18, 2019
4f322ad
[DJ1.9] Add used django.contrib apps in installed apps
McCio Feb 19, 2019
151d2fd
Merge pull request #215 from McCio/fix/prevent-trustee-enumeration
benadida Feb 23, 2019
c4b0c12
Merge pull request #216 from McCio/mccio/minor-changes
benadida Feb 23, 2019
3ead121
Remove traces of south (now unused)
McCio Feb 19, 2019
6b71ca9
Upgrade celery
McCio Feb 19, 2019
f33aa83
[DJ1.9] Fix some imports for django 1.9
McCio Feb 19, 2019
48e87d0
A bit more homogeneous redirect creation
McCio Feb 19, 2019
83b3c1a
Improvements to tests
McCio Feb 19, 2019
6c65968
[DJ1.9] Pre-fix tests for Django 1.9
McCio Feb 19, 2019
dc1b303
[DJ1.10] Redefine template settings
McCio Feb 19, 2019
59bd82f
[Travis] Upgrade pip instead of fixing setuptools' version
McCio Feb 19, 2019
6078c1c
[DJ1.9] Cannot import models from a django-app init (even as third-pa…
McCio Feb 19, 2019
04268e9
Use urlparse.parse_qs instead of cgi.parse_qs (deprecated)
McCio Feb 19, 2019
b94b798
Fixed election sorting in admin elections page
replaceafill Aug 21, 2018
dda86f9
Explicit some more imports removing almost all conflicting 'import *'
McCio Feb 19, 2019
a70a4be
Restore functionality of extract-passwords-for-email
McCio Feb 19, 2019
d973dd4
Upgrade Django to 1.9
McCio Mar 4, 2019
fa9b1be
[DJ1.10] SubfieldBase has been deprecated. Use Field.from_db_value in…
McCio Mar 4, 2019
6e4c92c
Silence urls.W002 warning.
McCio Mar 4, 2019
f768800
[DJ2] on_delete will be a required arg for ForeignKey, currently defa…
McCio Mar 4, 2019
c2c7f86
[DJ1.10] Upgrade Celery to 4.2.1, Kombu to 4.2.0
McCio Mar 4, 2019
1df36cd
[DJ2] SelectDateWidget is moved out of extras
McCio Mar 4, 2019
69ec942
[tests] Extend setup_login capabilities
McCio Mar 5, 2019
53c42db
[tests] Add admin user fixture and test accessibility of stats
McCio Mar 5, 2019
1b876a2
[DJ1.10] Update stats_urls to have names and be reversed by name
McCio Mar 7, 2019
ed9cf10
[DJ1.10] Update election_urls to have names and be reversed by name
McCio Mar 7, 2019
94cd4ae
[DJ1.10] Update helios.urls to have names and be reversed by name
McCio Mar 7, 2019
1d07bbc
Make stats_url_names and election_url_names visible from url_names
McCio Mar 7, 2019
742e12b
[DJ1.10] Update helios_auth.urls to have names and be reversed by name
McCio Mar 7, 2019
42025b9
[DJ1.10] Upgrade to Django 1.10
McCio Mar 7, 2019
18e2410
[DJ1.10] reverse function is now in django.urls
McCio Mar 5, 2019
350fd20
[DJ1.11] Fix widgets
McCio Mar 7, 2019
993f020
[DJ1.11] Upgrade to Django 1.11
McCio Mar 7, 2019
28ad702
[Travis] Test to run travis on both Xenial and Trusty
McCio Mar 7, 2019
d68c50c
[Travis] Postgres 9.3 isn't present in Xenial
McCio Mar 7, 2019
c36f0a9
Fix csrf_token on perms_why
McCio Mar 7, 2019
c57f1ac
[DJ2] Update HSTS Middleware to latest definition
McCio Mar 7, 2019
788ab95
Merge remote-tracking branch 'benadida/master' into django-1.11
McCio Mar 7, 2019
4be568f
Merge pull request #214 from McCio/mccio/auth-improve
benadida Apr 1, 2019
cbf92cb
Order loaded voter files by date
shirlei Mar 25, 2018
af9214d
Merge pull request #218 from shirlei/order_voter_files
benadida Apr 3, 2019
b453952
Update random.js
pereira Apr 11, 2019
895f3e2
Merge pull request #220 from pereira/master
benadida Apr 11, 2019
592a08a
Merge remote-tracking branch 'benadida/master' into django-1.11
McCio Jun 30, 2019
b52a755
Update pull from benadida repository. (#3)
millosolomillo Aug 21, 2019
df0d2c5
Revert "Update pull from benadida repository. (#3)" (#4)
millosolomillo Aug 21, 2019
fc6ce6e
Merge pull request #5 from benadida/master
millosolomillo Aug 21, 2019
1e7b3dd
Bump Django to 1.11.28
McCio Feb 17, 2020
f3435cb
[DJ1.8+] remove unneeded django-sslify and django-secure
McCio Mar 3, 2020
588979a
[celery] Make celery backend configurable
McCio Mar 22, 2020
3f04f6e
[readme] revert travis badge to benadida/helios-server
McCio Mar 22, 2020
0533e63
Merge pull request #217 from McCio/django-1.11
benadida Mar 24, 2020
4499889
add recent significant contributors
benadida Mar 28, 2020
9b697dc
Pulling updated benadida master branch (#6)
millosolomillo Apr 16, 2020
5bfd91a
Revert "Pulling updated benadida master branch (#6)" (#7)
millosolomillo Apr 16, 2020
ba296dc
Merge pull request #8 from benadida/master
millosolomillo Apr 16, 2020
da0f0f6
Approval voting improved message
DavidMertz Jun 7, 2020
15cfd7c
Update heliosbooth/templates/seal.html
DavidMertz Jun 7, 2020
25cb906
Remove in-house random pool in favor of pycryptodome library
McCio Jun 30, 2019
66ea4f6
Completely move to python 3, updating some libraries
McCio Jun 30, 2019
9f3ae27
[fix] Fix opening voter file as binary for unicodecsv reading
McCio Mar 3, 2020
338e6cd
[tests] Let django test handle the json conversion where possible
McCio Mar 3, 2020
25458ed
[tests] Minor test edit
McCio Mar 3, 2020
509b542
[py3] str-bytes comparisons
McCio Mar 3, 2020
393e7d9
Ignore multiple venv folders
McCio Mar 3, 2020
c2669a6
[bleach] Upgrade bleach
McCio Mar 3, 2020
074e931
Upgrade django-picklefield
McCio Mar 3, 2020
b62760c
[bleach] actually use bleach
McCio Mar 3, 2020
61ddefe
[tests] redirect improvements
McCio Mar 3, 2020
f1ce2f9
[auth] enforce AUTH_ENABLED_SYSTEMS
McCio Mar 3, 2020
bcc429d
[logging] log only INFO if not TESTING
McCio Mar 3, 2020
b588cf2
[db] db variables in settings and dj_database_url/psycopg2 upgrades
McCio Mar 3, 2020
63c13df
[deps] remove html5lib, requests, webtest.
McCio Mar 3, 2020
f315ab7
[Facebook] completely remove facebookclient
McCio Mar 3, 2020
d812168
[Travis] try to update travis tests matrix
McCio Mar 3, 2020
98efedf
[Travis] remove bionic.pg12 and add xenial.pg10
McCio Mar 3, 2020
396d169
[Travis] specify better matrix
McCio Mar 3, 2020
2af3e4f
[Travis] fix
McCio Mar 3, 2020
ae6e359
EncryptedVote JSON should not contain whitespace
thotypous Jul 25, 2020
755b038
Orders trustees by id
eduardormanika Jul 5, 2020
b54ffd0
Create a true Python list of these objects
eduardormanika Jul 9, 2020
d9f39f2
Update install instructions
milouk Jan 3, 2021
056eb56
type mismatch in new django version, max age needs to be an int
benadida Jan 10, 2021
684b249
log to stdout for heroku deployments and others
benadida Jan 10, 2021
302cda9
election extra var unnecessary and causes serialization issue
benadida Jan 10, 2021
e1090c7
Merge branch 'master' into bens-cleaned-up-py3
benadida Jan 23, 2021
0075e5a
missing migration
benadida Jan 23, 2021
b795f1c
fix python3-related bytes-to-string conversion in google auth
benadida Jan 23, 2021
64f6033
updated install instructions for python3
benadida Jan 23, 2021
a5b7009
Updated INSTALL.md with comment about RabbitMQ.
rgristroph Jan 24, 2021
fc22228
fix: python3 bytes to string for randomness
benadida Jan 25, 2021
728ade8
Merge branch 'master' into bens-cleaned-up-py3
benadida Jan 25, 2021
5682807
heroku python3 runtime indicator
benadida Jan 30, 2021
aa38530
update install instructions
benadida Feb 1, 2021
bdd916f
revert to other email validation package
benadida Feb 1, 2021
352a493
Remove numbering fields
shirlei Feb 7, 2021
f334fe0
Compress values before passing to format_value
shirlei Feb 7, 2021
2c5d5fb
fix trustee email display in verifier
benadida Feb 8, 2021
0f0948a
Merge pull request #277 from benadida/bens-cleaned-up-py3
benadida Feb 8, 2021
242719f
Fixing typo in install guide
pauarge Feb 10, 2021
bc09371
auth systems should always be present, even if not enabled, otherwise…
benadida Feb 13, 2021
b7243dc
allow for uploading of a latin1-encoded voter file, not just utf-8
benadida Feb 22, 2021
cd0b10f
handle badly formed timestamp
benadida Feb 22, 2021
3431846
Import Helios Models After Django Setup
itamarjp Aug 30, 2020
60e6629
Merge branch 'master' into election-view-detail
benadida Feb 22, 2021
4f31b43
Merge pull request #202 from edmarmartineli/election-view-detail
benadida Feb 22, 2021
9fa9fa9
Bump bleach from 1.4.1 to 3.3.0
dependabot[bot] Feb 8, 2021
b6d54e4
move to django 2.2
benadida Feb 22, 2021
f443261
hash utility should return an ascii string by default, was previously…
benadida Feb 22, 2021
9308a72
update python
benadida Mar 1, 2021
05a2788
instantiate gh auth flow
lizthegrey Aug 12, 2021
7036d55
The election object was not provided when the email is sent
edmarmartineli Feb 27, 2021
093a5e9
Bump django from 2.2.19 to 2.2.24
dependabot[bot] Jun 10, 2021
1a95b5f
wip
lizthegrey Sep 17, 2021
6e1aaaf
add voter_type to preview
lizthegrey Sep 17, 2021
99e1c17
fix obvious errors
lizthegrey Sep 17, 2021
e3f3ad4
avoid double-creating users
lizthegrey Sep 17, 2021
1da79be
Merge pull request #320 from lizthegrey/lizf.github-batch
benadida Oct 5, 2021
c478731
allow viewing a vote by full hash so we don't do quite as many DB que…
benadida Oct 6, 2021
ed351f4
remove link while figuring out error
benadida Oct 6, 2021
e94b952
show available voter types
benadida Oct 7, 2021
35b5cda
try U
benadida Oct 7, 2021
500c1b7
fixed UTF BOM
benadida Oct 7, 2021
e0e1d1f
fix bug introduced in previous PR with password uploads
benadida Oct 7, 2021
607e6b5
Merge pull request #240 from millosolomillo/master
benadida Oct 7, 2021
7b5a8b8
feat: allow sending email directly via mailgun API as an option
benadida Oct 18, 2021
3d1e839
Making Helios Booth responsive
pauarge Feb 16, 2021
9a4b295
format for ADMINS was wrong, fixing.
benadida Dec 5, 2021
d37ee8c
Open voter_stream in rb (binary) mode
Nov 14, 2021
d62ef20
Use substr() instead of substring() in SQL query
Nov 14, 2021
9a39b4e
don't error out if session has been cleared on cast done page.
benadida Dec 5, 2021
f5b021e
Drop superfluous x bits on pyton module and changelog
Dec 5, 2021
02b1959
add per question random order
benadida Dec 5, 2021
19555c3
improved vote casting confirmation email
benadida Dec 5, 2021
b18e3f6
fix padding
benadida Jan 12, 2022
9c7f138
ensure that a password voter has at least an empty user info dictiona…
benadida Jan 14, 2022
3695c8d
no name, use email instead for password voters
benadida Jan 14, 2022
6c181fc
simplify language that no one is reading anyways, get the audit out o…
benadida Jan 15, 2022
ee7d037
more streamlining of text, removal of 'smart' from ballot tracker cau…
benadida Jan 15, 2022
849564f
tweaks to FAQ for 2022
benadida Jan 15, 2022
ab322e5
nicer buttons, lighter text, clearer submission
benadida Jan 15, 2022
02049ba
more tweaks
benadida Jan 15, 2022
d2d2ab0
small tweaks
benadida Jan 17, 2022
b92f1d4
explain tracker, fix layout
benadida Jan 21, 2022
08c1874
additional guidance throughout the voting process
benadida Jan 28, 2022
8feb285
simpler templates
benadida Jan 28, 2022
b7195a0
small patch to make menu work on mobile. Ultimately need to upgrade f…
benadida Feb 6, 2022
e76171f
removed extraneous class
benadida Feb 6, 2022
68afb1e
simplified the template for additional info to make it more flexible.
benadida Mar 31, 2022
017a53c
fix copy help_email when copying election
edmarmartineli Dec 16, 2021
1f28c31
Update incorrect Scantegrity link
bkmgit Jan 4, 2023
57fb135
Remove broken Prêt à Voter link
bkmgit Jan 4, 2023
45f4069
Add ldapauth system
shirlei Feb 25, 2023
b1eeb1b
Some adjustments for python 3.6
shirlei Mar 3, 2023
067dfa9
Add ldap auth icon
shirlei Mar 3, 2023
1b8e92a
Do not enable LDAP by default
shirlei Apr 9, 2023
cea7411
Remove non-PR-related setting
shirlei Apr 9, 2023
2a2ecf8
tweak ballot submission button to clarify that your ballot won't be f…
benadida Feb 10, 2024
65e30cf
update python runtime
benadida Feb 10, 2024
fe35c7d
Revert "update python runtime"
benadida Feb 10, 2024
609352a
upgrade to python 3.8
benadida Apr 14, 2024
26fc185
python 3.9
benadida Apr 14, 2024
e83077b
Remove election.json
pauarge Apr 24, 2024
1dcaf3e
Remove unicodecsv dependency
pauarge Apr 24, 2024
c7ed060
Updating python dependencies
pauarge Apr 24, 2024
c841d2b
Update to Django 3.0
laoumh Jul 25, 2024
2506a31
Adds 'ldap' option to AUTH_ENABLED_SYSTEMS when in TESTING mode
laoumh Jul 26, 2024
b8d7449
Upgrade Django 3.0 to 4.0: django.conf.urls.url is removed, using dja…
laoumh Jul 29, 2024
21624b3
Upgrade Django 3.0 to 4.0: django.utils.translation.ugettext() is rem…
laoumh Jul 30, 2024
6ce8806
Upgrade Django 3.0 to 4.0: The 'providing_args' argument for django.d…
laoumh Jul 30, 2024
8713201
Upgrade Django 3.0 to 4.0: The {% ifequal %} and {% ifnotequal %} tem…
laoumh Jul 30, 2024
2bc8e1e
Upgrade Django 4.0 to 5.0
laoumh Jul 31, 2024
dc6aae0
Upgrade Django 4.0 to 5.0: update requirements.txt
laoumh Aug 1, 2024
4d4461a
Explicitly set DEFAULT_AUTO_FIELD, to silence warning models.W042 aft…
laoumh Aug 12, 2024
39c8902
up runtime to 3.12
benadida Sep 15, 2024
796614d
add Lucas Araujo to CONTRIBUTORS for upgrade to Django 5
benadida Sep 16, 2024
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
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ deploy-latest.sh
.DS_Store
*~
media/*
venv
venv*
celerybeat-*
env.sh
.cache
.cache
.idea/
52 changes: 42 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,46 @@
sudo: false
language: python
python:
- "2.7"
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
os: linux

jobs:
include:
- python: "3.7"
dist: xenial
addons:
postgresql: "9.5"
- python: "3.7"
dist: xenial
addons:
postgresql: "9.6"
- python: "3.7"
dist: xenial
addons:
postgresql: "10"
- python: "3.8"
dist: bionic
addons:
postgresql: "9.5"
- python: "3.8"
dist: bionic
addons:
postgresql: "9.6"
- python: "3.8"
dist: bionic
addons:
postgresql: "10"
- python: "3.8"
dist: bionic
addons:
postgresql: "11"

before_install:
- export BOTO_CONFIG=/dev/null

install:
- pip install setuptools==24.3.1
- pip install -r requirements.txt
# command to run tests, e.g. python setup.py test
script: "python manage.py test"
addons:
postgresql: "9.3"
- pip3 install --upgrade pip
- pip3 install -r requirements.txt
- pip3 freeze

before_script:
- psql -c 'create database helios;' -U postgres

script: "python3 -Wall manage.py test -v 2"
3 changes: 3 additions & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ Significant contributors:
- Olivier de Marneffe
- Emily Stark, Mike Hamburg, Tom Wu, and Dan Boneh for SJCL and integration of javascript crypto.
- Nicholas Chang-Fong and Aleksander Essex for security reports and fixes.
- Shirley Chaves
- Marco Ciotola
- Lucas Araujo
26 changes: 21 additions & 5 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
* install PostgreSQL 8.3+
* install PostgreSQL 9.5+

* install Rabbit MQ
This is needed for celery to work, which does background processing such as
the processing of uploaded list-of-voter CSV files.

* make sure you have virtualenv installed:
http://www.virtualenv.org/en/latest/
Expand All @@ -7,10 +11,22 @@ http://www.virtualenv.org/en/latest/

* cd into the helios-server directory

* create a virtualenv:
* install Python3.6 including dev, pip, and venv

```
sudo apt install python3.6 python3.6-venv python3.6-pip python3.6-venv
```

* create a virtualenv

```
python3.6 -m venv $(pwd)/venv
```

* you'll also need Postgres dev libraries. For example on Ubuntu:

```
virtualenv venv
sudo apt install libpq-dev
```

* activate virtual environment
Expand Down Expand Up @@ -45,6 +61,6 @@ python manage.py runserver

** set up oauth2 credentials as a web application, with your origin, e.g. https://myhelios.example.com, and your auth callback, which, based on our example, is https://myhelios.example.com/auth/after/

** still in the developer console, enable the Google+ API.
** still in the developer console, enable the Google+ API and Google People API.

** set the GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET configuration variables accordingly.
** set the GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET configuration variables accordingly.
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
web: gunicorn wsgi:application -b 0.0.0.0:$PORT -w 8
worker: python manage.py celeryd -E -B --beat --concurrency=1
worker: celery --app helios worker --events --beat --concurrency 1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

Helios is an end-to-end verifiable voting system.

![Travis Build Status](https://travis-ci.org/benadida/helios-server.svg?branch=master)
[![Travis Build Status](https://travis-ci.org/benadida/helios-server.svg?branch=master)](https://travis-ci.org/benadida/helios-server)

[![Stories in Ready](https://badge.waffle.io/benadida/helios-server.png?label=ready&title=Ready)](https://waffle.io/benadida/helios-server)
12 changes: 8 additions & 4 deletions extract-passwords-for-email.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
# python extract-passwords-for-email.py <election_uuid> <email_address>
#

from django.core.management import setup_environ
import settings, sys, csv
import sys

setup_environ(settings)
import csv
import django
import os

from helios.models import *
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
django.setup()

from helios.models import Election

election_uuid = sys.argv[1]
email = sys.argv[2]
Expand Down
8 changes: 5 additions & 3 deletions helios/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

from django.conf import settings
from django.core.urlresolvers import reverse
from helios.views import election_shortcut
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery_app import app as celery_app

__all__ = ('celery_app', 'TEMPLATE_BASE', 'ADMIN_ONLY', 'VOTERS_UPLOAD', 'VOTERS_EMAIL',)

TEMPLATE_BASE = settings.HELIOS_TEMPLATE_BASE or "helios/templates/base.html"

Expand Down
5 changes: 5 additions & 0 deletions helios/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig

class HeliosConfig(AppConfig):
name = 'helios'
verbose_name = "Helios"
21 changes: 21 additions & 0 deletions helios/celery_app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import os

# set the default Django settings module for the 'celery' program.
from celery import Celery

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings')

app = Celery()

# Using a string here means the worker doesn't have to serialize
# the configuration object to child processes.
# - namespace='CELERY' means all celery-related configuration keys
# should have a `CELERY_` prefix.
app.config_from_object('django.conf:settings', namespace='CELERY')

# Load task modules from all registered Django app configs.
app.autodiscover_tasks()

@app.task(bind=True)
def debug_task(self):
print('Request: {0!r}'.format(self.request))
Loading