diff --git a/helios b/helios index 0f70fed4e89092595296d0c84cc1276a51194e3d..35969f2b964c8aa9134c51da492ca0866b946f14 160000 --- a/helios +++ b/helios @@ -1 +1 @@ -Subproject commit 0f70fed4e89092595296d0c84cc1276a51194e3d +Subproject commit 35969f2b964c8aa9134c51da492ca0866b946f14 diff --git a/iacr/__init__.py b/iacr/__init__.py index f5946f83bd3fd5d7836484fd751730f0b8c378fb..a1b12535ce79472c736e5e20b8cf34c77b7273c5 100644 --- a/iacr/__init__.py +++ b/iacr/__init__.py @@ -1,9 +1,9 @@ """ -This django app is meant only to connect the pieces of Helios and Auth that are specific to Votwee +This django app is meant only to connect the pieces of Helios and Auth that are specific to IACR """ import glue import helios -helios.TEMPLATE_BASE = "votwee/templates/base.html" \ No newline at end of file +helios.TEMPLATE_BASE = "iacr/templates/base.html" \ No newline at end of file diff --git a/iacr/templates/base.html b/iacr/templates/base.html index 023ad29ef6e9a7038060e94b033b0b07e17d9385..f3e43574c17ba578fb735d8c322147ac0500a9d4 100644 --- a/iacr/templates/base.html +++ b/iacr/templates/base.html @@ -31,12 +31,6 @@ <div id="content"> <div id="header"> {% block header %} -{% if user %} -logged in as <b>{{user.name}} ({{user.user_type}})</b> -[<a href="{% url auth.views.logout %}?return_url={{CURRENT_URL}}">logout</a>] -{% else %} -not logged in. [<a href="{% url auth.views.index %}?return_url={{CURRENT_URL}}">login</a>] -{% endif %} {% endblock %} </div> {% block content %}{% endblock %} diff --git a/iacr/templates/index.html b/iacr/templates/index.html index 9c747336404d692f4ef201eebb5f90bd377c0791..88c745e90fa49e5ab0b51ba53b5f157548d9c735 100644 --- a/iacr/templates/index.html +++ b/iacr/templates/index.html @@ -4,29 +4,5 @@ {% block content %} <h1>Welcome to IACR Helios</h1> -{% if user %} -<p style="font-size: 1.4em;"> -logged in as <b>{{user.name}}</b>. -</p> - -<p> - {{elections|length}} elections administered: -{% for e in elections %} -<a href="{% url helios.views.one_election_view e.uuid %}">{{e.name}}</a> -{% endfor %} -</p> - -<p> - {{elections_registered|length}} elections for which you're registered: -{% for e in elections_registered %} -<a href="{% url helios.views.one_election_view e.uuid %}">{{e.name}}</a> -{% endfor %} -</p> - -<p> - <a href="{% url helios.views.election_new %}">create an election</a> -</p> -{% else %} -<a href="{% url auth.views.index %}">log in</a> -{% endif %} +<a href="{% url helios.views.one_election_view settings.IACR_ELECTION_UUID %}">the election</a> {% endblock %} diff --git a/iacr/view_utils.py b/iacr/view_utils.py index e06337af54fe398a70ef04237d642eee399936a5..bc7902571d5cc8b5d646cef676fd987f1c15f5c0 100644 --- a/iacr/view_utils.py +++ b/iacr/view_utils.py @@ -10,6 +10,8 @@ from django.shortcuts import render_to_response from auth.security import get_user +from django.conf import settings + ## ## template abstraction ## @@ -18,6 +20,7 @@ def render_template(request, template_name, vars = {}): vars_with_user = vars.copy() vars_with_user['user'] = get_user(request) + vars_with_user['settings'] = settings return render_to_response('iacr/templates/%s.html' % template_name, vars_with_user) diff --git a/iacr/views.py b/iacr/views.py index 8479e4d3bbec7c578acc6e7edd4b3bbaefd101a5..7539a5eb4b6429ecae233ff9074f9ed51db90410 100644 --- a/iacr/views.py +++ b/iacr/views.py @@ -1,5 +1,5 @@ """ -Votwee specific views +IACR specific views """ from helios.models import * diff --git a/settings.py b/settings.py index d70442d9f3ff0829e37000e0b8de9d6c86a7f324..6e8187dcba506a49c50aa55d0f9608a50fb9d7f3 100644 --- a/settings.py +++ b/settings.py @@ -107,7 +107,7 @@ DEFAULT_FROM_EMAIL = 'ben@adida.net' SERVER_EMAIL = DEFAULT_FROM_EMAIL # Make this unique, and don't share it with anybody. -SECRET_KEY = 'votweerulez!!!ohyeah,andheliostoo' +SECRET_KEY = 'iacrrulez!!!ohyeah,andheliostoo' #LOGIN_URL = '/account/login/' #LOGOUT_URL = '/account/logout/' @@ -125,4 +125,6 @@ APPEND_SLASH = False DEBUG = True TEMPLATE_DEBUG = True -URL_HOST = "https://iacr-helios.appspot.com" \ No newline at end of file +URL_HOST = "https://iacr-helios.appspot.com" + +IACR_ELECTION_UUID = 'foobar' \ No newline at end of file