Skip to content

Commit

Permalink
Merge branch 'master' into bens-cleaned-up-py3
Browse files Browse the repository at this point in the history
  • Loading branch information
benadida committed Jan 23, 2021
2 parents 2af3e4f + 302cda9 commit e1090c7
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
10 changes: 6 additions & 4 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ http://www.virtualenv.org/en/latest/

* cd into the helios-server directory

* create a virtualenv:
* create a virtualenv
* make sure you use Python2.7 and **not** Python3+
* The above can be done by typing something similar to

```
virtualenv venv
virtualenv --python=/usr/bin/python2.7 $(pwd)/venv
```

* activate virtual environment
Expand Down Expand Up @@ -45,6 +47,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: celery worker --app helios --events --beat --concurrency 1 --logfile celeryw.log --pidfile celeryw.pid
worker: celery worker --app helios --events --beat --concurrency 1
2 changes: 1 addition & 1 deletion helios/crypto/electionalgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def one_question_winner(question, result, num_cast_votes):
if question['result_type'] == 'relative':
return [counts[0][0]]


class Election(HeliosObject):
FIELDS = ['uuid', 'questions', 'name', 'short_name', 'description', 'voters_hash', 'openreg',
'frozen_at', 'public_key', 'private_key', 'cast_url', 'result', 'result_proof', 'use_voter_aliases',
Expand Down
2 changes: 1 addition & 1 deletion helios/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def freeze(self):
self.set_eligibility()

# public key for trustees
trustees = Trustee.get_by_election(self)
trustees = list(Trustee.get_by_election(self))
combined_pk = trustees[0].public_key
for t in trustees[1:]:
combined_pk = combined_pk * t.public_key
Expand Down
3 changes: 1 addition & 2 deletions helios/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1383,8 +1383,7 @@ def voters_email(request, election):
'custom_subject' : email_form.cleaned_data['subject'],
'custom_message' : email_form.cleaned_data['body'],
'election_vote_url' : election_vote_url,
'election_url' : election_url,
'election' : election
'election_url' : election_url
}

voter_constraints_include = None
Expand Down
1 change: 0 additions & 1 deletion settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def get_from_env(var, default):
# override if we have an env variable
if get_from_env('DATABASE_URL', None):
import dj_database_url

DATABASES['default'] = dj_database_url.config(conn_max_age=600, ssl_require=True)
DATABASES['default']['ENGINE'] = 'django.db.backends.postgresql_psycopg2'

Expand Down

0 comments on commit e1090c7

Please sign in to comment.