From 09020cf4f1a1435bffa565790daaf3fc09e368ea Mon Sep 17 00:00:00 2001 From: Ben Adida <ben@adida.net> Date: Wed, 26 Oct 2011 22:08:54 -0700 Subject: [PATCH] added ability to make private elections default to true --- helios/views.py | 2 +- settings.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/helios/views.py b/helios/views.py index 9b463ed..3269137 100644 --- a/helios/views.py +++ b/helios/views.py @@ -220,7 +220,7 @@ def election_new(request): error = None if request.method == "GET": - election_form = forms.ElectionForm() + election_form = forms.ElectionForm(initial={'private_p': settings.HELIOS_PRIVATE_DEFAULT}) else: election_form = forms.ElectionForm(request.POST) diff --git a/settings.py b/settings.py index 60c0bd3..306679d 100644 --- a/settings.py +++ b/settings.py @@ -144,6 +144,9 @@ HELIOS_ADMIN_ONLY = False HELIOS_VOTERS_UPLOAD = True HELIOS_VOTERS_EMAIL = True +# are elections private by default? +HELIOS_PRIVATE_DEFAULT = False + # authentication systems enabled #AUTH_ENABLED_AUTH_SYSTEMS = ['password','facebook','twitter', 'google', 'yahoo'] AUTH_ENABLED_AUTH_SYSTEMS = ['google'] -- GitLab