Skip to content
Snippets Groups Projects
Commit e1090c73 authored by Ben Adida's avatar Ben Adida
Browse files

Merge branch 'master' into bens-cleaned-up-py3

parents 2af3e4f1 302cda9b
Branches
No related tags found
No related merge requests found
...@@ -7,10 +7,12 @@ http://www.virtualenv.org/en/latest/ ...@@ -7,10 +7,12 @@ http://www.virtualenv.org/en/latest/
* cd into the helios-server directory * 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 * activate virtual environment
...@@ -45,6 +47,6 @@ python manage.py runserver ...@@ -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/ ** 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.
web: gunicorn wsgi:application -b 0.0.0.0:$PORT -w 8 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
\ No newline at end of file \ No newline at end of file
...@@ -516,7 +516,7 @@ class Election(HeliosModel): ...@@ -516,7 +516,7 @@ class Election(HeliosModel):
self.set_eligibility() self.set_eligibility()
# public key for trustees # public key for trustees
trustees = Trustee.get_by_election(self) trustees = list(Trustee.get_by_election(self))
combined_pk = trustees[0].public_key combined_pk = trustees[0].public_key
for t in trustees[1:]: for t in trustees[1:]:
combined_pk = combined_pk * t.public_key combined_pk = combined_pk * t.public_key
......
...@@ -1383,8 +1383,7 @@ def voters_email(request, election): ...@@ -1383,8 +1383,7 @@ def voters_email(request, election):
'custom_subject' : email_form.cleaned_data['subject'], 'custom_subject' : email_form.cleaned_data['subject'],
'custom_message' : email_form.cleaned_data['body'], 'custom_message' : email_form.cleaned_data['body'],
'election_vote_url' : election_vote_url, 'election_vote_url' : election_vote_url,
'election_url' : election_url, 'election_url' : election_url
'election' : election
} }
voter_constraints_include = None voter_constraints_include = None
......
...@@ -46,7 +46,6 @@ DATABASES = { ...@@ -46,7 +46,6 @@ DATABASES = {
# override if we have an env variable # override if we have an env variable
if get_from_env('DATABASE_URL', None): if get_from_env('DATABASE_URL', None):
import dj_database_url import dj_database_url
DATABASES['default'] = dj_database_url.config(conn_max_age=600, ssl_require=True) DATABASES['default'] = dj_database_url.config(conn_max_age=600, ssl_require=True)
DATABASES['default']['ENGINE'] = 'django.db.backends.postgresql_psycopg2' DATABASES['default']['ENGINE'] = 'django.db.backends.postgresql_psycopg2'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment