diff --git a/helios/crypto/utils.py b/helios/crypto/utils.py
index ad364dc87bab1a806e471b2a4171eb37ac50fe97..dd395a598fbbec1df4bce90f81e7d95a9228b32b 100644
--- a/helios/crypto/utils.py
+++ b/helios/crypto/utils.py
@@ -2,9 +2,7 @@
 Crypto Utils
 """
 
-import hmac, base64
-
-from django.utils import simplejson
+import hmac, base64, json
 
 from hashlib import sha256
   
@@ -18,8 +16,8 @@ def hash_b64(s):
   return result
 
 def to_json(d):
-  return simplejson.dumps(d, sort_keys=True)
+  return json.dumps(d, sort_keys=True)
 
 def from_json(json_str):
   if not json_str: return None
-  return simplejson.loads(json_str)
+  return json.loads(json_str)
diff --git a/helios/datatypes/djangofield.py b/helios/datatypes/djangofield.py
index 670eb59c345c01d73f67a0184c506ad7c1cc9e4b..4465da77d73c90fcbcfd8d9bec255fdbfc073647 100644
--- a/helios/datatypes/djangofield.py
+++ b/helios/datatypes/djangofield.py
@@ -7,10 +7,10 @@ and adapted to LDObject
 """
 
 import datetime
+import json
 from django.db import models
 from django.db.models import signals
 from django.conf import settings
-from django.utils import simplejson as json
 from django.core.serializers.json import DjangoJSONEncoder
 
 from . import LDObject
diff --git a/helios/datatypes/legacy.py b/helios/datatypes/legacy.py
index 766ed9212b028b109fa42d2182922f348d28aab2..c0a24ffc2ab2d0540d2953adf7469cd2f7c98e66 100644
--- a/helios/datatypes/legacy.py
+++ b/helios/datatypes/legacy.py
@@ -176,7 +176,7 @@ class DLogProof(LegacyObject):
 
     def __init__(self, wrapped_obj):
         if isinstance(wrapped_obj, dict):
-            import pdb; pdb.set_trace()
+            raise Exception("problem with dict")
 
         super(DLogProof,self).__init__(wrapped_obj)
 
diff --git a/helios/election_urls.py b/helios/election_urls.py
index 9b0f87470fcd1cfdb95e67419a2afde133b2042e..e6654d16187cdd6d503c955d7808361d686410b1 100644
--- a/helios/election_urls.py
+++ b/helios/election_urls.py
@@ -4,7 +4,7 @@ Helios URLs for Election related stuff
 Ben Adida (ben@adida.net)
 """
 
-from django.conf.urls.defaults import *
+from django.conf.urls import *
 
 from helios.views import *
 
diff --git a/helios/models.py b/helios/models.py
index 7fda728b4ea6b9f8bad655be3e4cbf459f6fde05..695494f1fa5c465d1d8604d77f35eb21f09e9577 100644
--- a/helios/models.py
+++ b/helios/models.py
@@ -7,7 +7,7 @@ Ben Adida
 """
 
 from django.db import models, transaction
-from django.utils import simplejson
+import json
 from django.conf import settings
 from django.core.mail import send_mail
 
diff --git a/helios/security.py b/helios/security.py
index 41d2e4869b26ba18a8d4571da747a9f40835b630..1a5a78df6e1ae875f2e0dd5b7379658dac8e3c52 100644
--- a/helios/security.py
+++ b/helios/security.py
@@ -26,8 +26,8 @@ def get_voter(request, user, election):
   return the current voter
   """
   voter = None
-  if request.session.has_key('CURRENT_VOTER'):
-    voter = request.session['CURRENT_VOTER']
+  if request.session.has_key('CURRENT_VOTER_ID'):
+    voter = Voter.objects.get(id=request.session['CURRENT_VOTER_ID'])
     if voter.election != election:
       voter = None
 
diff --git a/helios/stats_urls.py b/helios/stats_urls.py
index 53bae6eec7d336416d3c326687e433b293ba76d0..2d26d1961aabae3a75bef2e16117d9dd3eea7566 100644
--- a/helios/stats_urls.py
+++ b/helios/stats_urls.py
@@ -4,7 +4,7 @@ Helios URLs for Election related stuff
 Ben Adida (ben@adida.net)
 """
 
-from django.conf.urls.defaults import *
+from django.conf.urls import *
 
 from helios.stats_views import *
 
diff --git a/helios/templates/_castconfirm_password.html b/helios/templates/_castconfirm_password.html
index 4610d75f4828ef53107d40a558f94ca6e8d07ecb..25e31de2145cfba6ca39ffb009667ea14993cac8 100644
--- a/helios/templates/_castconfirm_password.html
+++ b/helios/templates/_castconfirm_password.html
@@ -1,5 +1,5 @@
 Please provide the voter ID and password you received by email.<br /><br />
-<form method="post" action="{% url helios.views.password_voter_login election.uuid %}" onsubmit="show_waiting()">
+<form method="post" action="{% url "helios.views.password_voter_login" election.uuid %}" onsubmit="show_waiting()">
 <input type="hidden" name="csrf_token" value="{{csrf_token}}" />
 <input type="hidden" name="return_url" value="{{return_url}}" />
 <input type="hidden" name="cast_ballot" value="{{cast_ballot}}" />
diff --git a/helios/templates/cast_done.html b/helios/templates/cast_done.html
index 14b61fbf91dbbc916b1483becb98be35875de654..e4ddf4cf83e1008a8abde5d66c1ac948c483a773 100644
--- a/helios/templates/cast_done.html
+++ b/helios/templates/cast_done.html
@@ -24,7 +24,7 @@
 {% endif %}
 
 <p style="font-size: 1.4em;">
-[ <a href="{% url helios.views.one_election_view election.uuid %}">return to election info</a> ]
+[ <a href="{% url "helios.views.one_election_view" election.uuid %}">return to election info</a> ]
 </p>
 
 {% endblock %}
diff --git a/helios/templates/castvote.html b/helios/templates/castvote.html
index bcba4ae89d4560bd48edbca83a8e18dae1c1e6bd..1c21d73f50e12e267c2ffbe247600813f12fb40d 100644
--- a/helios/templates/castvote.html
+++ b/helios/templates/castvote.html
@@ -3,7 +3,7 @@
 {% block title %}{{cast_vote.vote_tinyhash}} &mdash; {{election.name}}{% endblock %}
 {% block content %}
 <h2 class="title">Cast Vote {{cast_vote.vote_tinyhash}}</h2>
-cast in <a href="{% url helios.views.one_election_view election.uuid %}">{{election.name}}</a><br />
+cast in <a href="{% url "helios.views.one_election_view" election.uuid %}">{{election.name}}</a><br />
 Fingerprint: <tt>{{cast_vote.vote_hash}}</tt><br />
 by <b><u>
 {% if the_voter.alias %}
diff --git a/helios/templates/combine_decryptions.html b/helios/templates/combine_decryptions.html
index f5c9bea064321a2db0f2e78a70ecacb4163f748a..c14c762f5ae1b353ecf0d9436a6be55ed85240d7 100644
--- a/helios/templates/combine_decryptions.html
+++ b/helios/templates/combine_decryptions.html
@@ -2,7 +2,7 @@
 
 {% block title %}Compute Tally &mdash; {{election.name}}{% endblock %}
 {% block content %}
-  <h2 class="title">{{election.name}} &mdash; Compute Tally <span style="font-size:0.7em;">[<a href="{% url helios.views.one_election_view election.uuid %}">cancel</a>]</span></h2>
+  <h2 class="title">{{election.name}} &mdash; Compute Tally <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election.uuid %}">cancel</a>]</span></h2>
 
   <p>
     You are about to compute the tally for this election. You only will then see the results.
diff --git a/helios/templates/election_audited_ballots.html b/helios/templates/election_audited_ballots.html
index 247f3f3fdee6a135e15bfd062486ae4ebdf72699..2e01f9b3254d46ad750322e1996baa5c99bb3d60 100644
--- a/helios/templates/election_audited_ballots.html
+++ b/helios/templates/election_audited_ballots.html
@@ -3,7 +3,7 @@
 {% block title %}Audited Ballots for {{election.name}}{% endblock %}
 
 {% block content %}
-  <h2 class="title">{{election.name}} &mdash; Audited Ballots <span style="font-size:0.7em;">[<a href="{% url helios.views.one_election_view election_uuid=election.uuid %}">back to election</a>]</span></h2>
+  <h2 class="title">{{election.name}} &mdash; Audited Ballots <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election_uuid=election.uuid %}">back to election</a>]</span></h2>
 
 <p>
 When you prepare a ballot with Helios, you immediately receive a smart ballot tracker. Before you choose to cast that ballot, you have the option to ask Helios to "break open" that encrypted ballot and verify that Helios encrypted your ballot correctly. Once that's done, you can post that opened ballot here, on the audited ballots' list, for everyone to verify (your identity is not included). Once you've done this, you have to re-encrypt your choices and obtain a different smart ballot tracker. This helps reduce the chance that someone might coerce you to vote differently from your true choice.
@@ -14,7 +14,7 @@ These ballots are <em>not cast</em>, and they will not be counted. They are just
 </p>
 
 <p>
-  To verify an audited ballot, copy its entire content and paste it in the <a target="_new" href="/booth/single-ballot-verify.html?election_url={% url helios.views.one_election election.uuid %}">single ballot verifier</a>.
+  To verify an audited ballot, copy its entire content and paste it in the <a target="_new" href="/booth/single-ballot-verify.html?election_url={% url "helios.views.one_election" election.uuid %}">single ballot verifier</a>.
 </p>
 
 {% if audited_ballots %}
diff --git a/helios/templates/election_bboard.html b/helios/templates/election_bboard.html
index d170e666c8e2cb8a5d1781b29399cde4d8c374f6..a5fd7e7d9dd14bf16f26373bb97c4c277906707a 100644
--- a/helios/templates/election_bboard.html
+++ b/helios/templates/election_bboard.html
@@ -3,7 +3,7 @@
 {% block title %}Ballot Tracking Center for {{election.name}}{% endblock %}
 
 {% block content %}
-  <h2 class="title">{{election.name}} &mdash; Ballot Tracking Center <span style="font-size:0.7em;">[<a href="{% url helios.views.one_election_view election_uuid=election.uuid %}">back to election</a>]</span></h2>
+  <h2 class="title">{{election.name}} &mdash; Ballot Tracking Center <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election_uuid=election.uuid %}">back to election</a>]</span></h2>
 
 <p>
   This is the ballot tracking center, which displays the tracking numbers of all cast ballots in this election.
@@ -40,7 +40,7 @@ Name
 {{voter.alias}}
 {% else %}
 <img border="0" height="20" src="/static/auth/login-icons/{{voter.voter_type}}.png" alt="{{voter.voter_type}}" /> {% if voter.name %}{{voter.name}}{% else %}{{voter.voter_id}}{% endif %}
-{% endif %}</td><td><tt style="font-size: 1.4em;;">{% if voter.vote_hash %}{{voter.vote_hash}} <span style="font-size:0.8em;">[<a href="{% url helios.views.voter_last_vote election_uuid=election.uuid,voter_uuid=voter.uuid %}">view</a>]</span>{% else %}&mdash;{% endif %}</tt></td></tr>
+{% endif %}</td><td><tt style="font-size: 1.4em;;">{% if voter.vote_hash %}{{voter.vote_hash}} <span style="font-size:0.8em;">[<a href="{% url "helios.views.voter_last_vote" election_uuid=election.uuid voter_uuid=voter.uuid %}">view</a>]</span>{% else %}&mdash;{% endif %}</tt></td></tr>
 {% endfor %}
 </table>
 
diff --git a/helios/templates/election_build.html b/helios/templates/election_build.html
index 599fe40f6dd6917335d6c7c91f8d777ad46ba315..5488c2d12ea1ac58fbca900d46608f6526fcf18f 100644
--- a/helios/templates/election_build.html
+++ b/helios/templates/election_build.html
@@ -1,7 +1,7 @@
 {% extends "helios/templates/cryptobase.html" %}
 
 {% block content %}
-  <h2 class="title">{{election.name}} &mdash; Questions <span style="font-size:0.7em;">[<a href="{% url helios.views.one_election_view election.uuid %}">back to election</a>]</span></h2>
+  <h2 class="title">{{election.name}} &mdash; Questions <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election.uuid %}">back to election</a>]</span></h2>
 
   <script language="javascript">
 {% if election.questions %}
diff --git a/helios/templates/election_cast_confirm.html b/helios/templates/election_cast_confirm.html
index a064941b375ce39312f640ffde5eaacc3f68f68f..346284c6b9670de2e8968a9ed9a6c24cdb733d28 100644
--- a/helios/templates/election_cast_confirm.html
+++ b/helios/templates/election_cast_confirm.html
@@ -73,7 +73,7 @@ requires election-specific credentials.
   {% endif %}
   </b><br /></p>
 <p>
-    [<a href="{% url helios.views.one_election_view election.uuid %}">return to the main election page</a>]
+    [<a href="{% url "helios.views.one_election_view" election.uuid %}">return to the main election page</a>]
 </p>
 {% else %}
 <p>
diff --git a/helios/templates/election_edit.html b/helios/templates/election_edit.html
index b14c4a27a014236db6e8e7a3c84d93ed0bd5a317..0c6c08c3755b815d4bbc4294f8b9baece1a22ff6 100644
--- a/helios/templates/election_edit.html
+++ b/helios/templates/election_edit.html
@@ -2,7 +2,7 @@
 
 {% block content %}
 
-  <h2 class="title">{{election.name}} &mdash; Update <span style="font-size:0.7em;">[<a href="{% url helios.views.one_election_view election.uuid %}">cancel</a>]</span></h2>
+  <h2 class="title">{{election.name}} &mdash; Update <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election.uuid %}">cancel</a>]</span></h2>
   
 {% if error %}
 <p style="color: red;">
diff --git a/helios/templates/election_freeze.html b/helios/templates/election_freeze.html
index 7f5a630354e34ca90f6fab64c0e22fdb5c802f37..a0aad4dd0eb5b03443c166a996efdf84269f1811 100644
--- a/helios/templates/election_freeze.html
+++ b/helios/templates/election_freeze.html
@@ -29,7 +29,7 @@ You must freeze the ballot before you can contact voters.
         <li>{{issue.action}}</li>
         {% endfor %}
     </ul>
-    <a href="{% url helios.views.one_election_view election.uuid %}">go back to the election</a>
+    <a href="{% url "helios.views.one_election_view" election.uuid %}">go back to the election</a>
 </p>
 {% else %}
 <form method="post" action="">
diff --git a/helios/templates/election_keygenerator.html b/helios/templates/election_keygenerator.html
index 33da0dd0191ddf1b8eef6ec5b2db2409ad88bc12..60a2c55c703964884b93c44739c301ed47541561 100644
--- a/helios/templates/election_keygenerator.html
+++ b/helios/templates/election_keygenerator.html
@@ -134,7 +134,7 @@ Your key has been generated, but you may choose to<br /><a href="javascript:clea
 </p>
 </div>
 
-<form method="post" id="pk_form" action="{% url helios.views.trustee_upload_pk election.uuid, trustee.uuid %}">
+<form method="post" id="pk_form" action="{% url "helios.views.trustee_upload_pk" election.uuid trustee.uuid %}">
 <h3>Your Public Key</h3>
 <p>
     It's time to upload the public key to the server.
diff --git a/helios/templates/election_new_2.html b/helios/templates/election_new_2.html
index a53b1fec269a03b57a7b0727c282a3bbe9098c09..16061c2d0ca6ca50231499e2bd1d73626f24884b 100644
--- a/helios/templates/election_new_2.html
+++ b/helios/templates/election_new_2.html
@@ -56,7 +56,7 @@ $(document).ready(function() {
 <b>An election managed by multiple trustees</b>.
 {% endifequal %}
 {% endifequal %}
-  <form class="prettyform" action="{% url helios.views.election_new_3 %}" method="POST" id="create_election_form" onsubmit="return before_create();">
+  <form class="prettyform" action="{% url "helios.views.election_new_3" %}" method="POST" id="create_election_form" onsubmit="return before_create();">
       <input type="hidden" name="csrf_token" value="{{csrf_token}}" />
       <input type="hidden" name="name" value="{{name}}" />
       <input type="hidden" name="public_key" id="pk" value="" />
diff --git a/helios/templates/election_not_started.html b/helios/templates/election_not_started.html
index 22eec6cba18ac1bb0f9781a5a4f572194fd6c03c..4ba944e1a8a3b1ab9eb8351b5a2347f46e58c28f 100644
--- a/helios/templates/election_not_started.html
+++ b/helios/templates/election_not_started.html
@@ -9,6 +9,6 @@
   </p>
   
   <p>
-      <a href="{% url helios.views.one_election_view election.uuid %}">back to the election</a>
+      <a href="{% url "helios.views.one_election_view" election.uuid %}">back to the election</a>
   </p>
 {% endblock %}
diff --git a/helios/templates/election_questions.html b/helios/templates/election_questions.html
index adfb8602f3f626ec469563e04a71219ca7b1cee8..030b24f830c8b57b932906490b5d34316fe547f7 100644
--- a/helios/templates/election_questions.html
+++ b/helios/templates/election_questions.html
@@ -2,7 +2,7 @@
 
 {% block title %}Questions for {{election.name}}{% endblock %}
 {% block content %}
-  <h3 class="title">{{election.name}} &mdash; Questions <span style="font-size:0.7em;">[<a href="{% url helios.views.one_election_view election.uuid %}">back to election</a>]</span></h3>
+  <h3 class="title">{{election.name}} &mdash; Questions <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election.uuid %}">back to election</a>]</span></h3>
 
   <script language="javascript">
 {% if election.questions %}
diff --git a/helios/templates/election_register.html b/helios/templates/election_register.html
index 411f9dd4f1609e03f288b732a95271feeb9ebf18..e1c731e0ca219ede8118caddb3fb0bca29dd1333 100644
--- a/helios/templates/election_register.html
+++ b/helios/templates/election_register.html
@@ -16,7 +16,7 @@
     You are <em>not</em> registered for this election.
 </p>
 
-<form method="post" action="{% url helios.views.one_election_register election.uuid %}">
+<form method="post" action="{% url "helios.views.one_election_register" election.uuid %}">
 <input type="submit" value="register!" />
 </form>
 {% endif %}
diff --git a/helios/templates/election_tallied.html b/helios/templates/election_tallied.html
index 9d1a818185f898915b9a0bc10f45f704681f6992..9b00b636e94be8bcd05bfbe8d1a2a37412947b40 100644
--- a/helios/templates/election_tallied.html
+++ b/helios/templates/election_tallied.html
@@ -9,6 +9,6 @@
   </p>
   
   <p>
-      <a href="{% url helios.views.one_election_view election.uuid %}">view the election tally</a>
+      <a href="{% url "helios.views.one_election_view" election.uuid %}">view the election tally</a>
   </p>
 {% endblock %}
\ No newline at end of file
diff --git a/helios/templates/election_view.html b/helios/templates/election_view.html
index 3bd61e2e78db722255895b590190a2ac85d165d3..64bf5e2ee9179c4f1d520a6264c2357c688e4760 100644
--- a/helios/templates/election_view.html
+++ b/helios/templates/election_view.html
@@ -5,7 +5,7 @@
   <h3 class="title">{{ election.name }}
 {% if admin_p %}
 {% if not election.frozen_at %}
-<small><a class="small button" href="{% url helios.views.one_election_edit election.uuid %}">edit</a></small>
+<small><a class="small button" href="{% url "helios.views.one_election_edit" election.uuid %}">edit</a></small>
 {% endif %}
 {% endif %}</h3>
 <p style="padding-top:0px; margin-top:0px">
@@ -14,7 +14,7 @@
 [archived]
 {% endif %}
 {% if admin_p %}
-&nbsp;{% if election.is_archived %}<a class="small button" href="{% url helios.views.one_election_archive election_uuid=election.uuid %}?archive_p=0">unarchive it</a>{% else %}<a class="small button" href="{% url helios.views.one_election_archive election_uuid=election.uuid %}?archive_p=1">archive it</a>{% endif %}
+&nbsp;{% if election.is_archived %}<a class="small button" href="{% url "helios.views.one_election_archive" election_uuid=election.uuid %}?archive_p=0">unarchive it</a>{% else %}<a class="small button" href="{% url "helios.views.one_election_archive" election_uuid=election.uuid %}?archive_p=1">archive it</a>{% endif %}
 {% endif %}
 <br />
 {% if admin_p %}
@@ -22,12 +22,12 @@
 {% if election.featured_p %}
 this {{election.election_type}} is featured on the front page.
 {% if can_feature_p %}
-[<a href="{% url helios.views.one_election_set_featured election.uuid %}?featured_p=0">unfeature it</a>]
+[<a href="{% url "helios.views.one_election_set_featured" election.uuid %}?featured_p=0">unfeature it</a>]
 {% endif %}
 {% else %}
 this {{election.election_type}} is <u>not</u> featured on the front page.
 {% if can_feature_p %}
-[<a href="{% url helios.views.one_election_set_featured election.uuid %}?featured_p=1">feature it</a>]
+[<a href="{% url "helios.views.one_election_set_featured" election.uuid %}?featured_p=1">feature it</a>]
 {% endif %}
 {% endif %}
 {% endif %}
@@ -54,11 +54,11 @@ this {{election.election_type}} is <u>not</u> featured on the front page.
 {% endif %}
 
 <p align="center" style="font-size: 1.5em;">
-<a href="{% url helios.views.one_election_questions election.uuid %}">questions ({% if election.questions %}{{election.questions|length}}{% else %}0{% endif %})</a>
+<a href="{% url "helios.views.one_election_questions" election.uuid %}">questions ({% if election.questions %}{{election.questions|length}}{% else %}0{% endif %})</a>
 &nbsp;&nbsp;|&nbsp;&nbsp;
-<a href="{% url helios.views.voters_list_pretty election.uuid %}">voters &amp; ballots</a>
+<a href="{% url "helios.views.voters_list_pretty" election.uuid %}">voters &amp; ballots</a>
 &nbsp;&nbsp;|&nbsp;&nbsp;
-<a href="{% url helios.views.list_trustees_view election.uuid %}">trustees ({{trustees|length}})</a>
+<a href="{% url "helios.views.list_trustees_view" election.uuid %}">trustees ({{trustees|length}})</a>
 </p>
 
 {% if admin_p %}
@@ -90,7 +90,7 @@ this {{election.election_type}} is <u>not</u> featured on the front page.
 {{issue.action}}{% if forloop.last %}{% else %}, and{% endif %}<br />
 {% endfor %}
 {% else %}
-<a href="{% url helios.views.one_election_freeze election.uuid %}">freeze ballot and open election.</a>
+<a href="{% url "helios.views.one_election_freeze" election.uuid %}">freeze ballot and open election.</a>
 <br />
 {% if election.voting_starts_at %}
 once you do this, the election will be ready for voting and will open automatically<br />
@@ -107,20 +107,20 @@ once you do this, the election will be immediately open for voting.
 Tally computation is under way.<br />
 Reload this page in a couple of minutes.
 {% else %}
-<a href="{% url helios.views.one_election_compute_tally election.uuid %}">compute encrypted tally</a><br />
+<a href="{% url "helios.views.one_election_compute_tally" election.uuid %}">compute encrypted tally</a><br />
 The encrypted votes will be combined into an encrypted tally. Once this is done,<br />
 trustees will be asked to provide their share of the decryption.
 {% endif %}
 {% else %}
 
 {% if election.result %}
-<a href="{% url helios.views.release_result election.uuid %}">release result</a><br />
+<a href="{% url "helios.views.release_result" election.uuid %}">release result</a><br />
 The result displayed below is visible only to you.<br />
 Once you release the result, it will be visible to everyone.
 {% else %}
 
 {% if election.ready_for_decryption_combination %}
-<a href="{% url helios.views.combine_decryptions election.uuid %}">
+<a href="{% url "helios.views.combine_decryptions" election.uuid %}">
 {% if election.num_trustees == 1 %}
 compute results
 {% else %}
@@ -134,7 +134,7 @@ The decryption shares from the trustees will be combined and the tally computed.
 Once you do this, the tally will visible to you, the administrator, only.
 {% endif %}
 {% else %}
-<a href="{% url helios.views.list_trustees_view election.uuid %}">trustees (for decryption)</a>
+<a href="{% url "helios.views.list_trustees_view" election.uuid %}">trustees (for decryption)</a>
 {% endif %}
 
 {% endif %}
@@ -239,7 +239,7 @@ You are <em>not eligible</em> to vote in this {{election.election_type}}.
 {% if election.openreg %}
 {% if election.eligibility %}
 This election is open to: {{election.pretty_eligibility|safe}}
-<a href="{{settings.SECURE_URL_HOST}}{% url helios_auth.views.index %}?return_url={{CURRENT_URL}}">Log in</a> to check your eligibility.
+<a href="{{settings.SECURE_URL_HOST}}{% url "helios_auth.views.index" %}?return_url={{CURRENT_URL}}">Log in</a> to check your eligibility.
 {% else %}
 Anyone can vote in this election.
 {% endif %}
@@ -271,22 +271,22 @@ Anyone can vote in this election.
 {% endif %}
 
 <p style="font-size: 1.3em;">
-<a href="{% url helios.views.voters_list_pretty election.uuid %}">Ballot Tracking Center</a> &nbsp;| &nbsp;
-<a href="{% url helios.views.one_election_audited_ballots election.uuid %}">Audited Ballots</a>
+<a href="{% url "helios.views.voters_list_pretty" election.uuid %}">Ballot Tracking Center</a> &nbsp;| &nbsp;
+<a href="{% url "helios.views.one_election_audited_ballots" election.uuid %}">Audited Ballots</a>
 </p>
 
 {% endif %}
 
 {% if not election.voting_has_started %}
 <p style="font-size: 1.2em;">
-  <a href="{{SECURE_URL_HOST}}/booth/vote.html?election_url={% url helios.views.one_election election.uuid %}">preview booth</a>
+  <a href="{{SECURE_URL_HOST}}/booth/vote.html?election_url={% url "helios.views.one_election" election.uuid %}">preview booth</a>
 </p>
 {% endif %}  
 
 {% if election.voting_has_stopped %}
 <p style="font-size: 1.2em;">
 {% if election.result %}
-verify <a target="_blank" href="/verifier/verify.html?election_url={% url helios.views.one_election election.uuid %}">election tally</a>.
+verify <a target="_blank" href="/verifier/verify.html?election_url={% url "helios.views.one_election" election.uuid %}">election tally</a>.
 {% endif %}
 
 review the <a href="{{vote_url}}">voting booth</a>.
diff --git a/helios/templates/elections_administered.html b/helios/templates/elections_administered.html
index ac6ded8ba08b8e2d5db0a8393dc592730417964d..3db1018a389eb3a35ca0994ca7138b4cc78bba60 100644
--- a/helios/templates/elections_administered.html
+++ b/helios/templates/elections_administered.html
@@ -5,7 +5,7 @@
 
 <ul>
 {% for election in elections %}
-<li> <a href="{% url helios.views.one_election_view election.uuid %}">{{election.name}}</a></li>
+<li> <a href="{% url "helios.views.one_election_view" election.uuid %}">{{election.name}}</a></li>
 {% endfor %}
 </ul>
 {% endblock %}
\ No newline at end of file
diff --git a/helios/templates/elections_voted.html b/helios/templates/elections_voted.html
index 61a718f87916a4c0f657967449ced5ddb066c107..7447eb09f63ef179d5e9afa0166b8f5736cf2b05 100644
--- a/helios/templates/elections_voted.html
+++ b/helios/templates/elections_voted.html
@@ -5,7 +5,7 @@
 
 <ul>
 {% for election in elections %}
-<li> <a href="{% url helios.views.one_election_view election.uuid %}">{{election.name}}</a></li>
+<li> <a href="{% url "helios.views.one_election_view" election.uuid %}">{{election.name}}</a></li>
 {% endfor %}
 </ul>
 {% endblock %}
diff --git a/helios/templates/list_trustees.html b/helios/templates/list_trustees.html
index eb08a9e37ff065eb5bb75f6195fc52471f5eb43a..6fde29580fe0c47cb8a9ee6fe9b123636278b583 100644
--- a/helios/templates/list_trustees.html
+++ b/helios/templates/list_trustees.html
@@ -3,7 +3,7 @@
 {% block title %}Trustees for {{election.name}}{% endblock %}
 
 {% block content %}
-  <h3 class="title">{{election.name}} &mdash; Trustees <span style="font-size:0.7em;">[<a href="{% url helios.views.one_election_view election.uuid %}">back to election</a>]</span></h3>
+  <h3 class="title">{{election.name}} &mdash; Trustees <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election.uuid %}">back to election</a>]</span></h3>
 
 <p>
     Trustees are responsible for decrypting the election result.<br />
@@ -21,11 +21,11 @@
 
 {% if admin_p %}
 <p>
-    [ <a onclick="return(confirm('Adding your own trustee requires a good bit more work to tally the election.\nYou will need to have trustees generate keypairs and safeguard their secret key.\n\nIf you are not sure what that means, we strongly recommend\nclicking Cancel and letting Helios tally the election for you.'));" href="{% url helios.views.new_trustee election.uuid %}">add a trustee</a> ]
+    [ <a onclick="return(confirm('Adding your own trustee requires a good bit more work to tally the election.\nYou will need to have trustees generate keypairs and safeguard their secret key.\n\nIf you are not sure what that means, we strongly recommend\nclicking Cancel and letting Helios tally the election for you.'));" href="{% url "helios.views.new_trustee" election.uuid %}">add a trustee</a> ]
 </p>
 {% if not election.has_helios_trustee %}
 <p>
-    <a href="{% url helios.views.new_trustee_helios election.uuid %}">add Helios as a trustee</a>
+    <a href="{% url "helios.views.new_trustee_helios" election.uuid %}">add Helios as a trustee</a>
 </p>
 {% endif %}
 {% endif %}
@@ -39,11 +39,11 @@
 <h5> Trustee #{{forloop.counter}}: {{t.name}} 
 {% if admin_p %}
 {% if t.secret_key %}
-{% if not election.frozen_at %}[<a onclick="return confirm('Are you sure you want to remove Helios as a trustee?');" href="{% url helios.views.delete_trustee election.uuid %}?uuid={{t.uuid}}">x</a>]{% endif %}
+{% if not election.frozen_at %}[<a onclick="return confirm('Are you sure you want to remove Helios as a trustee?');" href="{% url "helios.views.delete_trustee" election.uuid %}?uuid={{t.uuid}}">x</a>]{% endif %}
 {% else %}
 ({{t.email}})
-{% if not election.frozen_at %}[<a onclick="return confirm('Are you sure you want to remove this Trustee?');" href="{% url helios.views.delete_trustee election.uuid %}?uuid={{t.uuid}}">x</a>]{% endif %}
-[<a onclick="return confirm('Are you sure you want to send this trustee his/her admin URL?');" href="{% url helios.views.trustee_send_url election.uuid t.uuid %}">send login</a>]
+{% if not election.frozen_at %}[<a onclick="return confirm('Are you sure you want to remove this Trustee?');" href="{% url "helios.views.delete_trustee" election.uuid %}?uuid={{t.uuid}}">x</a>]{% endif %}
+[<a onclick="return confirm('Are you sure you want to send this trustee his/her admin URL?');" href="{% url "helios.views.trustee_send_url" election.uuid t.uuid %}">send login</a>]
 {% endif %}
 {% endif %}
 </h5>
diff --git a/helios/templates/new_trustee.html b/helios/templates/new_trustee.html
index d733d29dedbc6658c6df7328f2926504858f8910..d41079c189e29ee80a23afecc8b83d5f8921832f 100644
--- a/helios/templates/new_trustee.html
+++ b/helios/templates/new_trustee.html
@@ -1,7 +1,7 @@
 {% extends "helios/templates/cryptobase.html" %}
 
 {% block content %}
-  <h2 class="title">{{election.name}} &mdash; New Trustee <span style="font-size:0.7em;">[<a href="{% url helios.views.list_trustees_view election.uuid %}">cancel</a>]</span></h2>
+  <h2 class="title">{{election.name}} &mdash; New Trustee <span style="font-size:0.7em;">[<a href="{% url "helios.views.list_trustees_view" election.uuid %}">cancel</a>]</span></h2>
   
 <form method="post" action="">
 Name: <input type="text" name="name" size="60" /><br /><br />
diff --git a/helios/templates/release_result.html b/helios/templates/release_result.html
index 5dc4276618c1a6d627adce39b8f2b34ae2f52f23..b97a241f0178a5ed33d1f6146695b579045c7cbf 100644
--- a/helios/templates/release_result.html
+++ b/helios/templates/release_result.html
@@ -2,7 +2,7 @@
 
 {% block title %}Release Result &mdash; {{election.name}}{% endblock %}
 {% block content %}
-  <h2 class="title">{{election.name}} &mdash; Release Result <span style="font-size:0.7em;">[<a href="{% url helios.views.one_election_view election.uuid %}">cancel</a>]</span></h2>
+  <h2 class="title">{{election.name}} &mdash; Release Result <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election.uuid %}">cancel</a>]</span></h2>
 
   <p>
     You are about to release the result for this election.
diff --git a/helios/templates/stats.html b/helios/templates/stats.html
index a45c1e37113cc41a95ea7d624edfeab7641661d6..37468b7150a3e90bf27c1ea7c89028c8a089d231 100644
--- a/helios/templates/stats.html
+++ b/helios/templates/stats.html
@@ -5,11 +5,11 @@
 <h1>Admin</h1>
 
 <ul>
-<li> <a href="{% url helios.stats_views.elections %}">elections</a></li>
-<li> <a href="{% url helios.stats_views.recent_votes %}">recent votes</a></li>
-<li> <a href="{% url helios.stats_views.recent_problem_elections %}">recent problem elections</a></li>
+<li> <a href="{% url "helios.stats_views.elections" %}">elections</a></li>
+<li> <a href="{% url "helios.stats_views.recent_votes" %}">recent votes</a></li>
+<li> <a href="{% url "helios.stats_views.recent_problem_elections" %}">recent problem elections</a></li>
 </ul>
 
-<p><b>{{num_votes_in_queue}}</b> votes in queue. {% if num_votes_in_queue %}[<a href="{% url helios.stats_views.force_queue %}">force it</a>]{% endif %}</p>
+<p><b>{{num_votes_in_queue}}</b> votes in queue. {% if num_votes_in_queue %}[<a href="{% url "helios.stats_views.force_queue" %}">force it</a>]{% endif %}</p>
 
 {% endblock %}
diff --git a/helios/templates/stats_elections.html b/helios/templates/stats_elections.html
index 7fe41331670b0464cb7682de3e4cc56901f0543d..bb4a232f359701d87a117314023a7104d4ac3775 100644
--- a/helios/templates/stats_elections.html
+++ b/helios/templates/stats_elections.html
@@ -18,7 +18,7 @@ Elections {{elections_page.start_index}} - {{elections_page.end_index}}&nbsp;&nb
 
 {% for election in elections %}
 <p>
-<b><a href="{% url helios.views.one_election_view election.uuid %}">{{election.name}}</a></b> by <a href="mailto:{{election.admin.info.email}}">{{election.admin.pretty_name}}</a> -- {{election.num_voters}} voters / {{election.num_cast_votes}} cast votes
+<b><a href="{% url "helios.views.one_election_view" election.uuid %}">{{election.name}}</a></b> by <a href="mailto:{{election.admin.info.email}}">{{election.admin.pretty_name}}</a> -- {{election.num_voters}} voters / {{election.num_cast_votes}} cast votes
 </p>
 {% endfor %}
 
diff --git a/helios/templates/stats_problem_elections.html b/helios/templates/stats_problem_elections.html
index 341e375dfd3945f7d8bb16a80f7d4d6fca0ffd44..9f8c1dadd43bf52905d1c844088443ea72da07b0 100644
--- a/helios/templates/stats_problem_elections.html
+++ b/helios/templates/stats_problem_elections.html
@@ -8,7 +8,7 @@ Unfrozen for more than a day.
 
 {% for election in elections %}
 <p>
-<b><a href="{% url helios.views.one_election_view election.uuid %}">{{election.name}}</a></b> -- {{election.num_voters}} voters
+<b><a href="{% url "helios.views.one_election_view" election.uuid %}">{{election.name}}</a></b> -- {{election.num_voters}} voters
 </p>
 {% endfor %}
 
diff --git a/helios/templates/stats_recent_votes.html b/helios/templates/stats_recent_votes.html
index d68bbd451a1de32beff39ecb24f1a5880dfae593..37c074161f3f973c4bab1d9c4f2d2118c79f327c 100644
--- a/helios/templates/stats_recent_votes.html
+++ b/helios/templates/stats_recent_votes.html
@@ -8,7 +8,7 @@ Last 24 hours
 
 {% for election in elections %}
 <p>
-<b><a href="{% url helios.views.one_election_view election.uuid %}">{{election.name}}</a></b> -- {{election.last_cast_vote}} {{election.num_recent_cast_votes}} recently cast votes
+<b><a href="{% url "helios.views.one_election_view" election.uuid %}">{{election.name}}</a></b> -- {{election.last_cast_vote}} {{election.num_recent_cast_votes}} recently cast votes
 </p>
 {% endfor %}
 
diff --git a/helios/templates/trustee_decrypt_and_prove.html b/helios/templates/trustee_decrypt_and_prove.html
index fbdce0155179f846a3d7a084ba805abd0bb84795..d4cbe438493aa0c6c9a00778acccaece94bc5956 100644
--- a/helios/templates/trustee_decrypt_and_prove.html
+++ b/helios/templates/trustee_decrypt_and_prove.html
@@ -197,7 +197,7 @@ function reset() {
   </div>
   
   <div id="done_div">
-      Done! <a href="{% url helios.views.one_election_view election.uuid %}">Back to election</a>
+      Done! <a href="{% url "helios.views.one_election_view" election.uuid %}">Back to election</a>
   </div>
   
   <div id="error_div">
diff --git a/helios/templates/trustee_home.html b/helios/templates/trustee_home.html
index f4becb522bac2f2f051172ef9464fd912966f6c7..5f6ee9c54e66c1884114827b208f518888c96bc8 100644
--- a/helios/templates/trustee_home.html
+++ b/helios/templates/trustee_home.html
@@ -7,9 +7,9 @@
 {% if trustee.public_key_hash %}
 You have successfully uploaded your public key.<br />
 Your public key fingerprint is: <b>{{trustee.public_key_hash}}</b>.<br />
-You can <a href="{% url helios.views.trustee_check_sk election.uuid, trustee.uuid %}">verify that you have the right secret key</a>.
+You can <a href="{% url "helios.views.trustee_check_sk" election.uuid trustee.uuid %}">verify that you have the right secret key</a>.
 {% else %}
-<a href="{% url helios.views.trustee_keygenerator election.uuid, trustee.uuid %}">setup your key</a>
+<a href="{% url "helios.views.trustee_keygenerator" election.uuid trustee.uuid %}">setup your key</a>
 {% endif %}
 </p>
 
@@ -19,7 +19,7 @@ You can <a href="{% url helios.views.trustee_check_sk election.uuid, trustee.uui
 You have successfully uploaded your decryption.
 {% else %}
     The encrypted tally for this election is ready.<br />
-    <a href="{% url helios.views.trustee_decrypt_and_prove election.uuid, trustee.uuid %}">decrypt with your key</a>
+    <a href="{% url "helios.views.trustee_decrypt_and_prove" election.uuid trustee.uuid %}">decrypt with your key</a>
 {% endif %}
 {% else %}
 Once the tally is computed, come back here to provide your secret key for decryption purposes.<br />
diff --git a/helios/templates/voters_eligibility.html b/helios/templates/voters_eligibility.html
index eb40311348cbec764bd2bd66b0595cd0629c109a..51343befd47591e0b937a484a32b4a3dfe7675ea 100644
--- a/helios/templates/voters_eligibility.html
+++ b/helios/templates/voters_eligibility.html
@@ -2,7 +2,7 @@
 
 {% block title %}Voter Eligibility for {{election.name}}{% endblock %}
 {% block content %}
-  <h2 class="title">{{election.name}} &mdash; Voter Eligibility <span style="font-size:0.7em;">[<a href="{% url helios.views.voters_list_pretty election.uuid %}">back to voters</a>]</span></h2>
+  <h2 class="title">{{election.name}} &mdash; Voter Eligibility <span style="font-size:0.7em;">[<a href="{% url "helios.views.voters_list_pretty" election.uuid %}">back to voters</a>]</span></h2>
 
 <p>
 <em>{{election.pretty_eligibility|safe}}</em>
diff --git a/helios/templates/voters_email.html b/helios/templates/voters_email.html
index 32a38ab29abcf3a902bf89bffb3dcc8535d5e245..011005412896821e5804eb1b06b252307189b72b 100644
--- a/helios/templates/voters_email.html
+++ b/helios/templates/voters_email.html
@@ -9,7 +9,7 @@ voter_id = '{{voter.voter_id}}';
 {% endif %}
 </script>
 
-  <h2 class="title">{{election.name}} &mdash; Contact Voters <span style="font-size:0.7em;">[<a href="{% url helios.views.one_election_view election.uuid %}">back to election</a>]</span></h2>
+  <h2 class="title">{{election.name}} &mdash; Contact Voters <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election.uuid %}">back to election</a>]</span></h2>
 
 {% if voter %}  
   <p>
@@ -55,7 +55,7 @@ You may tweak the subject and add a custom message using the form below.
   </div>
   
   <div id="done" style="display:none;">
-    Done, go <a href="{% url helios.views.one_election_view election.uuid %}">back to election</a>.
+    Done, go <a href="{% url "helios.views.one_election_view" election.uuid %}">back to election</a>.
   </div>
 
   <div id="error" style="display:none;">
diff --git a/helios/templates/voters_list.html b/helios/templates/voters_list.html
index b2460a2a974ec93c38e6cda68990712122ca18ed..f2db9d3042db1ff11a66c83e89c1f5c1d73ae7aa 100644
--- a/helios/templates/voters_list.html
+++ b/helios/templates/voters_list.html
@@ -2,7 +2,7 @@
 
 {% block title %}Voters &amp; Ballot Tracking Center for {{election.name}}{% endblock %}
 {% block content %}
-  <h3 class="title">{{election.name}} &mdash; Voters and Ballot Tracking Center <span style="font-size:0.7em;">[<a href="{% url helios.views.one_election_view election.uuid %}">back to election</a>]</span></h3>
+  <h3 class="title">{{election.name}} &mdash; Voters and Ballot Tracking Center <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election.uuid %}">back to election</a>]</span></h3>
 
 <p>
 <b>Who can vote?</b>
@@ -18,7 +18,7 @@
 <em>Your election is marked private, which means you cannot open registration up more widely</em>.<br />
 {% else %}
 You can change this setting:
-<form method="post" action="{% url helios.views.voters_eligibility election.uuid %}">
+<form method="post" action="{% url "helios.views.voters_eligibility" election.uuid %}">
 <input type="hidden" name="csrf_token" value="{{csrf_token}}" />
 <input type="radio" name="eligibility" value="openreg" {% if election.openreg and not election.eligibility %}CHECKED{% endif %} /> anyone can vote<br />
 <input type="radio" name="eligibility" value="closedreg" {% if not election.openreg %}CHECKED{% endif %} /> only voters listed explicitly below can vote<br />
@@ -37,7 +37,7 @@ You can change this setting:
 {% endif %}
 
 {% if email_voters and election.frozen_at and admin_p %}
-<p><a class="button" href="{% url helios.views.voters_email election.uuid %}">email voters</a></p>
+<p><a class="button" href="{% url "helios.views.voters_email" election.uuid %}">email voters</a></p>
 {% endif %}
 
 {% if election.num_voters > 20 %}
@@ -45,7 +45,7 @@ You can change this setting:
 {% if q %}
 <p><em>searching for <u>{{q}}</u>.</em> [<a href="?">clear search</a>]</p>
 {% else %}
-<form method="get" action="{% url helios.views.voters_list_pretty election.uuid %}"><b>search</b>: <input type="text" name="q" /> <input type="submit" value="search" /></form>
+<form method="get" action="{% url "helios.views.voters_list_pretty" election.uuid %}"><b>search</b>: <input type="text" name="q" /> <input type="submit" value="search" /></form>
 {% endif %}
 </p>
 {% endif %}
@@ -54,7 +54,7 @@ You can change this setting:
 <!-- Add a Voter: WORK HERE-->
 {% if upload_p and not election.openreg %}
 <p>
-<a class="button" href="{% url helios.views.voters_upload election_uuid=election.uuid %}">bulk upload voters</a>
+<a class="button" href="{% url "helios.views.voters_upload" election_uuid=election.uuid %}">bulk upload voters</a>
 </p>
 
 {% if voter_files %}
@@ -125,15 +125,15 @@ Voters {{voters_page.start_index}} - {{voters_page.end_index}} (of {{total_voter
 {% if admin_p or not election.use_voter_aliases %}
 <td>
 {% if admin_p %}
-[<a href="{% url helios.views.voters_email election.uuid %}?voter_id={{voter.voter_login_id}}">email</a>]
-[<a onclick="return confirm('are you sure you want to remove {{voter.name}} ?');" href="{% url helios.views.voter_delete election.uuid, voter.uuid %}">x</a>]
+[<a href="{% url "helios.views.voters_email" election.uuid %}?voter_id={{voter.voter_login_id}}">email</a>]
+[<a onclick="return confirm('are you sure you want to remove {{voter.name}} ?');" href="{% url "helios.views.voter_delete" election.uuid voter.uuid %}">x</a>]
 {% endif %}
 <img class="small-logo" src="/static/auth/login-icons/{{voter.voter_type}}.png" alt="{{voter.voter_type}}" /> {{voter.name}}</td>
 {% endif %}
 {% if election.use_voter_aliases %}
 <td>{{voter.alias}}</td>
 {% endif %}
-<td><tt style="font-size: 1.4em;;">{% if voter.vote_hash %}{{voter.vote_hash}} <span style="font-size:0.8em;">[<a href="{% url helios.views.castvote_shortcut vote_tinyhash=voter.vote_tinyhash %}">view</a>]</span>{% else %}&mdash;{% endif %}</tt></td>
+<td><tt style="font-size: 1.4em;;">{% if voter.vote_hash %}{{voter.vote_hash}} <span style="font-size:0.8em;">[<a href="{% url "helios.views.castvote_shortcut" vote_tinyhash=voter.vote_tinyhash %}">view</a>]</span>{% else %}&mdash;{% endif %}</tt></td>
 </tr>
 {% endfor %}
 </table>
diff --git a/helios/templates/voters_manage.html b/helios/templates/voters_manage.html
index 9fb592df25ee3bb3d58abd9cc15760f28529f85d..ccd54906ab945a00ec8b8cb5b57fd59ae71523a5 100644
--- a/helios/templates/voters_manage.html
+++ b/helios/templates/voters_manage.html
@@ -1,12 +1,12 @@
 {% extends TEMPLATE_BASE %}
 
 {% block content %}
-  <h2 class="title">{{election.name}} &mdash; Manage Voters <span style="font-size:0.7em;">[<a href="{% url helios.views.one_election_view election.uuid %}">back to election</a>]</span></h2>
+  <h2 class="title">{{election.name}} &mdash; Manage Voters <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election.uuid %}">back to election</a>]</span></h2>
 
-<form method="get" action="{% url helios.views.voters_search election.uuid %}"><b>search</b>: <input type="text" name="q" /> <input type="submit" value="search" /></form>
+<form method="get" action="{% url "helios.views.voters_search" election.uuid %}"><b>search</b>: <input type="text" name="q" /> <input type="submit" value="search" /></form>
 
 {% if upload_p %}
-<p><a href="{% url helios.views.voters_upload election_uuid=election.uuid %}">bulk upload voters</a></p>
+<p><a href="{% url "helios.views.voters_upload" election_uuid=election.uuid %}">bulk upload voters</a></p>
 {% endif %}
 
 Voters {{offset_plus_one}} - {{offset_plus_limit}} &nbsp;&nbsp;
@@ -29,11 +29,11 @@ Voters {{offset_plus_one}} - {{offset_plus_limit}} &nbsp;&nbsp;
 <tr><td>{{voter.alias}}</td><td>{{voter.name}}</td><td>{{voter.voter_id}}
 {% if election.frozen_at %}
 {% else %}
-[<a onclick="return confirm('are you sure you want to remove {{voter.name}} ?');" href="{% url helios.views.voter_delete election.uuid, voter.uuid %}">x</a>]
+[<a onclick="return confirm('are you sure you want to remove {{voter.name}} ?');" href="{% url "helios.views.voter_delete" election.uuid voter.uuid %}">x</a>]
 {% endif %}
 </td></tr>
 {% endfor %}
 </table>
 
 
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/helios/templates/voters_search.html b/helios/templates/voters_search.html
index 77cafcaa52c20a30f6a1b63ef710b69b034a818a..1adfb33fe1bf5123a30bae6eb03915644a23740b 100644
--- a/helios/templates/voters_search.html
+++ b/helios/templates/voters_search.html
@@ -1,12 +1,12 @@
 {% extends TEMPLATE_BASE %}
 
 {% block content %}
-  <h2 class="title">{{election.name}} &mdash; Search Voters for '{{search_term}}' <span style="font-size:0.7em;">[<a href="{% url helios.views.one_election_view election.uuid %}">back to election</a>]</span></h2>
+  <h2 class="title">{{election.name}} &mdash; Search Voters for '{{search_term}}' <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election.uuid %}">back to election</a>]</span></h2>
 
 {% if voter %}
 Voter Found: {{voter.name}} ({{voter.voter_id}})<br /><br />
 {% if election.frozen_at %}
-<a href="{% url helios.views.voters_email election.uuid %}?voter_id={{voter.voter_id}}">email this voter</a>
+<a href="{% url "helios.views.voters_email" election.uuid %}?voter_id={{voter.voter_id}}">email this voter</a>
 {% else %}
 once this election is frozen, you'll be able to email this voter.
 {% endif %}
diff --git a/helios/templates/voters_upload.html b/helios/templates/voters_upload.html
index d8ea34121443db0bbb18ce1918a2e9735e9e9bc7..a38956d019d1d02b90f43c184239e072f38353cd 100644
--- a/helios/templates/voters_upload.html
+++ b/helios/templates/voters_upload.html
@@ -1,7 +1,7 @@
 {% extends TEMPLATE_BASE %}
 
 {% block content %}
-  <h2 class="title">{{election.name}} &mdash; Bulk Upload Voters <span style="font-size:0.7em;">[<a href="{% url helios.views.one_election_view election.uuid %}">back to election</a>]</span></h2>
+  <h2 class="title">{{election.name}} &mdash; Bulk Upload Voters <span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election.uuid %}">back to election</a>]</span></h2>
 
 <form method="post" action="" id="upload_form" enctype="multipart/form-data">
   <p>
diff --git a/helios/templates/voters_upload_confirm.html b/helios/templates/voters_upload_confirm.html
index 20caaae7a311f9fdc380c9e1f74315135a73174c..c3d7c084b58b285b09959d3e72fc48ef28309cf6 100644
--- a/helios/templates/voters_upload_confirm.html
+++ b/helios/templates/voters_upload_confirm.html
@@ -1,7 +1,7 @@
 {% extends TEMPLATE_BASE %}
 
 {% block content %}
-  <h2 class="title">{{election.name}} &mdash; Bulk Upload Voters &mdash; Confirm<span style="font-size:0.7em;">[<a href="{% url helios.views.one_election_view election.uuid %}">back to election</a>]</span></h2>
+  <h2 class="title">{{election.name}} &mdash; Bulk Upload Voters &mdash; Confirm<span style="font-size:0.7em;">[<a href="{% url "helios.views.one_election_view" election.uuid %}">back to election</a>]</span></h2>
 
 <p>
 You have uploaded a file of voters. The first few rows of this file are:
@@ -23,7 +23,7 @@ HOLD ON:<br />
 </p>
 <br />
 
-<a href="{% url helios.views.voters_upload_cancel election.uuid %}">never mind, upload a different file</a>
+<a href="{% url "helios.views.voters_upload_cancel" election.uuid %}">never mind, upload a different file</a>
 </p>
 
 {% else %}
@@ -34,7 +34,7 @@ HOLD ON:<br />
   <input type="submit" value="Yes, let's go" />
 </form>
 
-<a href="{% url helios.views.voters_upload_cancel election.uuid %}">no, let me upload a different file</a>
+<a href="{% url "helios.views.voters_upload_cancel" election.uuid %}">no, let me upload a different file</a>
 
 {% endif %}
 
diff --git a/helios/tests.py b/helios/tests.py
index b39c3a87a09f4591d35a5dda0db68ed12d853eed..b3ed32a94c8c5d8b1de99a4eef0fc9df315a22cd 100644
--- a/helios/tests.py
+++ b/helios/tests.py
@@ -49,7 +49,7 @@ class ElectionModelTests(TestCase):
     
     def setUp(self):
         self.user = auth_models.User.objects.get(user_id='ben@adida.net', user_type='google')
-        self.fb_user = auth_models.User.objects.get(user_type='facebook')
+        self.fb_user = auth_models.User.objects.filter(user_type='facebook')[0]
         self.election, self.created_p = self.create_election()
 
     def test_create_election(self):
@@ -486,7 +486,7 @@ class ElectionBlackboxTests(WebTest):
                 "election_type" : "referendum",
                 "use_voter_aliases": "0",
                 "use_advanced_audit_features": "1",
-                "private_p" : "0"})
+                "private_p" : "False"})
 
         self.assertRedirects(response, "/auth/?return_url=/helios/elections/new")
     
@@ -527,7 +527,7 @@ class ElectionBlackboxTests(WebTest):
             "election_type" : "referendum",
             "use_voter_aliases": "0",
             "use_advanced_audit_features": "1",
-            "private_p" : "0"}
+            "private_p" : "False"}
 
         # override with the given
         full_election_params.update(election_params)
@@ -757,7 +757,7 @@ class ElectionBlackboxTests(WebTest):
 
     def test_do_complete_election_private(self):
         # private election
-        election_id, username, password = self._setup_complete_election({'private_p' : "1"})
+        election_id, username, password = self._setup_complete_election({'private_p' : "True"})
 
         # get the password_voter_login_form via the front page
         # (which will test that redirects are doing the right thing)
@@ -788,10 +788,10 @@ class ElectionBlackboxTests(WebTest):
                 "election_type" : "election",
                 "use_voter_aliases": "0",
                 "use_advanced_audit_features": "1",
-                "private_p" : "0"})
+                "private_p" : "False"})
 
         election_id = re.match("(.*)/elections/(.*)/view", response['Location']).group(2)
-        
+
         # update eligiblity
         response = self.client.post("/helios/elections/%s/voters/eligibility" % election_id, {
                 "csrf_token" : self.client.session['csrf_token'],
diff --git a/helios/urls.py b/helios/urls.py
index a8cfd41f7ea2c7162636975a42346b6338da1c10..1a0df511afb7cdbd6548432aa6a4d4d5888cc32e 100644
--- a/helios/urls.py
+++ b/helios/urls.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-from django.conf.urls.defaults import *
+from django.conf.urls import *
 
 from django.conf import settings
 
diff --git a/helios/view_utils.py b/helios/view_utils.py
index 70b85f678f59e0c1f5289cc6e324ef59117d2620..3e3fb5a81461e0616af9b9ac2b937b2196071924 100644
--- a/helios/view_utils.py
+++ b/helios/view_utils.py
@@ -77,7 +77,7 @@ def render_json(json_txt):
   return HttpResponse(json_txt, "application/json")
 
 # decorator
-def json(func):
+def return_json(func):
     """
     A decorator that serializes the output to JSON before returning to the
     web client.
diff --git a/helios/views.py b/helios/views.py
index 572517c1dab0093ccad67cee585829a72ec79702..36e36200db8abfd8e0004126b44b93fb5190e558 100644
--- a/helios/views.py
+++ b/helios/views.py
@@ -115,7 +115,7 @@ def admin_autologin(request):
 ## General election features
 ##
 
-@json
+@return_json
 def election_params(request):
   return ELGAMAL_PARAMS_LD_OBJECT.toJSONDict()
 
@@ -265,14 +265,14 @@ def one_election_schedule(request, election):
   return HttpResponse("foo")
 
 @election_view()
-@json
+@return_json
 def one_election(request, election):
   if not election:
     raise Http404
   return election.toJSONDict(complete=True)
 
 @election_view()
-@json
+@return_json
 def one_election_meta(request, election):
   if not election:
     raise Http404
@@ -381,7 +381,7 @@ def socialbuttons(request):
 ## As of July 2009, there are always trustees for a Helios election: one trustee is acceptable, for simple elections.
 ##
 @election_view()
-@json
+@return_json
 def list_trustees(request, election):
   trustees = Trustee.get_by_election(election)
   return [t.toJSONDict(complete=True) for t in trustees]
@@ -500,7 +500,7 @@ def trustee_upload_pk(request, election, trustee):
 ##
 
 @election_view()
-@json
+@return_json
 def get_randomness(request, election):
   """
   get some randomness to sprinkle into the sjcl entropy pool
@@ -512,7 +512,7 @@ def get_randomness(request, election):
     }
 
 @election_view(frozen=True)
-@json
+@return_json
 def encrypt_ballot(request, election):
   """
   perform the ballot encryption given answers_json, a JSON'ified list of list of answers
@@ -591,7 +591,7 @@ def password_voter_login(request, election):
       voter = election.voter_set.get(voter_login_id = password_login_form.cleaned_data['voter_id'].strip(),
                                      voter_password = password_login_form.cleaned_data['password'].strip())
 
-      request.session['CURRENT_VOTER'] = voter
+      request.session['CURRENT_VOTER_ID'] = voter.id
 
       # if we're asked to cast, let's do it
       if request.POST.get('cast_ballot') == "1":
@@ -753,7 +753,7 @@ def one_election_cast_done(request, election):
       logout = settings.LOGOUT_ON_CONFIRMATION
     else:
       logout = False
-      del request.session['CURRENT_VOTER']
+      del request.session['CURRENT_VOTER_ID']
 
     save_in_session_across_logouts(request, 'last_vote_hash', vote_hash)
     save_in_session_across_logouts(request, 'last_vote_cv_url', cv_url)
@@ -780,14 +780,14 @@ def one_election_cast_done(request, election):
                          include_user=(not logout))
 
 @election_view()
-@json
+@return_json
 def one_election_result(request, election):
   if not election.result_released_at:
     raise PermissionDenied
   return election.result
 
 @election_view()
-@json
+@return_json
 def one_election_result_proof(request, election):
   if not election.result_released_at:
     raise PermissionDenied
@@ -1355,7 +1355,7 @@ def voters_email(request, election):
 
 # Individual Voters
 @election_view()
-@json
+@return_json
 def voter_list(request, election):
   # normalize limit
   limit = int(request.GET.get('limit', 500))
@@ -1365,7 +1365,7 @@ def voter_list(request, election):
   return [v.ld_object.toDict() for v in voters]
   
 @election_view()
-@json
+@return_json
 def one_voter(request, election, voter_uuid):
   """
   View a single voter's info as JSON.
@@ -1376,7 +1376,7 @@ def one_voter(request, election, voter_uuid):
   return voter.toJSONDict()  
 
 @election_view()
-@json
+@return_json
 def voter_votes(request, election, voter_uuid):
   """
   all cast votes by a voter
@@ -1386,7 +1386,7 @@ def voter_votes(request, election, voter_uuid):
   return [v.toJSONDict()  for v in votes]
 
 @election_view()
-@json
+@return_json
 def voter_last_vote(request, election, voter_uuid):
   """
   all cast votes by a voter
@@ -1399,7 +1399,7 @@ def voter_last_vote(request, election, voter_uuid):
 ##
 
 @election_view()
-@json
+@return_json
 def ballot_list(request, election):
   """
   this will order the ballots from most recent to oldest.
diff --git a/helios_auth/auth_systems/facebookclient/__init__.py b/helios_auth/auth_systems/facebookclient/__init__.py
index 6e5e6ce923af35606e8a305609f3e5435a865fca..03264730c9ab284b3500793fc232ad15175a945e 100644
--- a/helios_auth/auth_systems/facebookclient/__init__.py
+++ b/helios_auth/auth_systems/facebookclient/__init__.py
@@ -57,21 +57,24 @@ import mimetypes
 
 # try to use simplejson first, otherwise fallback to XML
 RESPONSE_FORMAT = 'JSON'
-try:
-    import json as simplejson
-except ImportError:
-    try:
-        import simplejson
-    except ImportError:
-        try:
-            from django.utils import simplejson
-        except ImportError:
-            try:
-                import jsonlib as simplejson
-                simplejson.loads
-            except (ImportError, AttributeError):
-                from xml.dom import minidom
-                RESPONSE_FORMAT = 'XML'
+
+import json
+
+# try:
+#     import json as simplejson
+# except ImportError:
+#     try:
+#         import simplejson
+#     except ImportError:
+#         try:
+#             from django.utils import simplejson
+#         except ImportError:
+#             try:
+#                 import jsonlib as simplejson
+#                 simplejson.loads
+#             except (ImportError, AttributeError):
+#                 from xml.dom import minidom
+#                 RESPONSE_FORMAT = 'XML'
 
 # support Google App Engine.  GAE does not have a working urllib.urlopen.
 try:
diff --git a/helios_auth/auth_systems/facebookclient/djangofb/default_app/views.py b/helios_auth/auth_systems/facebookclient/djangofb/default_app/views.py
index 931d6216a8f689167f7c5d22facf9b69551daeff..609314fe01b3bf546984841b9dded39756bfa0cb 100644
--- a/helios_auth/auth_systems/facebookclient/djangofb/default_app/views.py
+++ b/helios_auth/auth_systems/facebookclient/djangofb/default_app/views.py
@@ -1,5 +1,5 @@
 from django.http import HttpResponse
-from django.views.generic.simple import direct_to_template
+# from django.views.generic.simple import direct_to_template
 #uncomment the following two lines and the one below
 #if you dont want to use a decorator instead of the middleware
 #from django.utils.decorators import decorator_from_middleware
@@ -30,7 +30,8 @@ def canvas(request):
     # User is guaranteed to be logged in, so pass canvas.fbml
     # an extra 'fbuser' parameter that is the User object for
     # the currently logged in user.
-    return direct_to_template(request, 'canvas.fbml', extra_context={'fbuser': user})
+    #return direct_to_template(request, 'canvas.fbml', extra_context={'fbuser': user})
+    return None
 
 @facebook.require_login()
 def ajax(request):
diff --git a/helios_auth/auth_systems/google.py b/helios_auth/auth_systems/google.py
index e13a9f4c7e95bf865d7a4d481b557cd8a867d2b2..00a6bb7180ffab81d5b5bf56f65f3b5b08b1d664 100644
--- a/helios_auth/auth_systems/google.py
+++ b/helios_auth/auth_systems/google.py
@@ -28,11 +28,13 @@ def get_flow(redirect_url=None):
 def get_auth_url(request, redirect_url):
   flow = get_flow(redirect_url)
 
-  request.session['google-flow'] = flow
+  request.session['google-redirect-url'] = redirect_url
   return flow.step1_get_authorize_url()
 
 def get_user_info_after_auth(request):
-  flow = request.session['google-flow']
+  flow = get_flow(request.session['google-redirect-url'])
+  del request.session['google-redirect-url']
+
   code = request.GET['code']
   credentials = flow.step2_exchange(code)
 
@@ -79,4 +81,4 @@ def check_constraint(constraint, user_info):
   """
   for eligibility
   """
-  pass
\ No newline at end of file
+  pass
diff --git a/helios_auth/auth_systems/openid/util.py b/helios_auth/auth_systems/openid/util.py
index 75272ea2570f3d70d0e205d2f153f4be1a3a423a..277b92ca18f21b5c9f465701217fe82fdea94c28 100644
--- a/helios_auth/auth_systems/openid/util.py
+++ b/helios_auth/auth_systems/openid/util.py
@@ -11,7 +11,6 @@ from django.template import loader
 from django import http
 from django.core.exceptions import ImproperlyConfigured
 from django.core.urlresolvers import reverse as reverseURL
-from django.views.generic.simple import direct_to_template
 
 from django.conf import settings
 
@@ -141,13 +140,3 @@ def normalDict(request_data):
     """
     return dict((k, v[0]) for k, v in request_data.iteritems())
 
-def renderXRDS(request, type_uris, endpoint_urls):
-    """Render an XRDS page with the specified type URIs and endpoint
-    URLs in one service block, and return a response with the
-    appropriate content-type.
-    """
-    response = direct_to_template(
-        request, 'xrds.xml',
-        {'type_uris':type_uris, 'endpoint_urls':endpoint_urls,})
-    response['Content-Type'] = YADIS_CONTENT_TYPE
-    return response
diff --git a/helios_auth/auth_systems/openid/view_helpers.py b/helios_auth/auth_systems/openid/view_helpers.py
index d5ce72cd81290c2541b5c1cd31f7b1f94da911a8..06eef8a287bbbf0d5a05d32d8ed0e13939761eac 100644
--- a/helios_auth/auth_systems/openid/view_helpers.py
+++ b/helios_auth/auth_systems/openid/view_helpers.py
@@ -1,7 +1,6 @@
 
 from django import http
 from django.http import HttpResponseRedirect
-from django.views.generic.simple import direct_to_template
 
 from openid.consumer import consumer
 from openid.consumer.discover import DiscoveryFailure
@@ -66,7 +65,6 @@ def start_openid(session, openid_url, trust_root, return_to):
         error = "OpenID discovery error: %s" % (str(e),)
 
     if error:
-        import pdb; pdb.set_trace()
         raise Exception("error in openid")
 
     # Add Simple Registration request information.  Some fields
diff --git a/helios_auth/jsonfield.py b/helios_auth/jsonfield.py
index 61b26ace3e1e14661d5cb35d8070986a8ebecab3..c0c83a69e0474cf83688567873a7416d65750fdc 100644
--- a/helios_auth/jsonfield.py
+++ b/helios_auth/jsonfield.py
@@ -4,11 +4,10 @@ taken from
 http://www.djangosnippets.org/snippets/377/
 """
 
-import datetime
+import datetime, json
 from django.db import models
 from django.db.models import signals
 from django.conf import settings
-from django.utils import simplejson as json
 from django.core.serializers.json import DjangoJSONEncoder
 
 class JSONField(models.TextField):
diff --git a/helios_auth/security/__init__.py b/helios_auth/security/__init__.py
index 373c9dace1dd4d32bc51d75e0a62dbaf8524e00d..b036067d9b837e4156df46fd9a6efdc78516b98f 100644
--- a/helios_auth/security/__init__.py
+++ b/helios_auth/security/__init__.py
@@ -95,7 +95,7 @@ def get_user(request):
   # request.session.set_expiry(settings.SESSION_COOKIE_AGE)
   
   # set up CSRF protection if needed
-  if not request.session.has_key('csrf_token') or type(request.session['csrf_token']) != str:
+  if not request.session.has_key('csrf_token') or (type(request.session['csrf_token']) != str and type(request.session['csrf_token']) != unicode):
     request.session['csrf_token'] = str(uuid.uuid4())
 
   if request.session.has_key('user'):
diff --git a/helios_auth/templates/index.html b/helios_auth/templates/index.html
index 604c3702e85c07a9c9716006d8e6a66bc308b2c6..f16a7b80cf80e6362c2b70b5ce264f278cc0934f 100644
--- a/helios_auth/templates/index.html
+++ b/helios_auth/templates/index.html
@@ -8,7 +8,7 @@
     You are currently logged in as<br /><b>{{user.user_id}}</b> via <b>{{user.user_type}}</b>.
 </p>
 <p>
-    <a href="{% url helios_auth.views.logout %}">logout</a>
+    <a href="{% url "helios_auth.views.logout" %}">logout</a>
 </p>
 
 {% else %}
diff --git a/helios_auth/templates/login_box.html b/helios_auth/templates/login_box.html
index bd85be0185a2ea9a8a62da634f4d665de3b27191..d3fb7f4f882e43579654f4d1021820c98942adb5 100644
--- a/helios_auth/templates/login_box.html
+++ b/helios_auth/templates/login_box.html
@@ -1,11 +1,11 @@
 {% if default_auth_system %}
-<p><a  style="font-size:1.3em; border: 1px solid #bbb; padding: 5px;" href="{% url helios_auth.views.start system_name=default_auth_system %}?return_url={{return_url}}">{{default_auth_system_obj.LOGIN_MESSAGE}}</a></p>
+<p><a  style="font-size:1.3em; border: 1px solid #bbb; padding: 5px;" href="{% url "helios_auth.views.start" system_name=default_auth_system %}?return_url={{return_url}}">{{default_auth_system_obj.LOGIN_MESSAGE}}</a></p>
 {% else %}
 {% for auth_system in enabled_auth_systems %}
 {% ifequal auth_system "password" %}
 {% else %}
 <p>
-    <a href="{{SECURE_URL_HOST}}{% url helios_auth.views.start system_name=auth_system %}?return_url={{return_url}}" style="font-size: 1.4em;">
+    <a href="{{SECURE_URL_HOST}}{% url "helios_auth.views.start" system_name=auth_system %}?return_url={{return_url}}" style="font-size: 1.4em;">
 <img border="0" height="35" src="/static/auth/login-icons/{{auth_system}}.png" alt="{{auth_system}}" /> {{auth_system}}
 {% endifequal %}
 </a>
diff --git a/helios_auth/urls.py b/helios_auth/urls.py
index 9db44e420a6b0b16d98c18463db7f80865d1242e..e4dca398503d1e2f802fd4811330b66b9020a1a9 100644
--- a/helios_auth/urls.py
+++ b/helios_auth/urls.py
@@ -4,7 +4,7 @@ Authentication URLs
 Ben Adida (ben@adida.net)
 """
 
-from django.conf.urls.defaults import *
+from django.conf.urls import *
 
 from views import *
 from auth_systems.password import password_login_view, password_forgotten_view
diff --git a/helios_auth/utils.py b/helios_auth/utils.py
index 78a613a596f0b1deef8b3a3610269df038793e0f..f57dedf6e961e8598963049dca55f6cdaf211f00 100644
--- a/helios_auth/utils.py
+++ b/helios_auth/utils.py
@@ -5,18 +5,18 @@ Some basic utils
 2010-08-17
 """
 
-from django.utils import simplejson
+import json
 
 ## JSON
 def to_json(d):
-  return simplejson.dumps(d, sort_keys=True)
+  return json.dumps(d, sort_keys=True)
   
 def from_json(json_str):
   if not json_str: return None
-  return simplejson.loads(json_str)
+  return json.loads(json_str)
   
 def JSONtoDict(json):
-    x=simplejson.loads(json)
+    x=json.loads(json)
     return x
     
 def JSONFiletoDict(filename):
diff --git a/requirements.txt b/requirements.txt
index d4212da7da640f2840dec177d8b0e551234ce01a..569b6438e442a39ff1b74342931f58d03d7ca22e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
-Django==1.4.18
+Django==1.6.10
 South==0.8.2
 anyjson==0.3.1
 celery==3.0.16
diff --git a/server_ui/templates/base.html b/server_ui/templates/base.html
index 95edbd95a58f8223aee6e0e078998b3944e9ce6d..ac5f2d13cc11ccd1a60456482fe5199d985e7476 100644
--- a/server_ui/templates/base.html
+++ b/server_ui/templates/base.html
@@ -42,7 +42,7 @@
       <!-- Right Nav Section -->
       <ul class="right">
 	{% if user and user.admin_p %}
-	<li><a href="{% url helios.stats_views.home %}">Admin</a></li>
+	<li><a href="{% url "helios.stats_views.home" %}">Admin</a></li>
 	<li class="divider"></li>
 	{% endif %}
 	{% if not settings.MASTER_HELIOS %}
@@ -88,13 +88,13 @@
     </span>-->
     {% if user %}
     logged in as <b>{{user.display_html_small|safe}}</b>&nbsp;&nbsp;
-    <a class="tiny button" href="{% url helios_auth.views.logout %}?return_url={{CURRENT_URL}}">logout</a><br />
+    <a class="tiny button" href="{% url "helios_auth.views.logout" %}?return_url={{CURRENT_URL}}">logout</a><br />
     {% else %}
     {% if voter %}
-    You are signed in as voter <u>{% if voter.alias %}{{voter.alias}}{% else %}{{voter.name}}{% endif %}</u> in election <u>{{voter.election.name}}</u>. [<a href="{{settings.SECURE_URL_HOST}}{% url helios_auth.views.logout %}?return_url={{CURRENT_URL}}">sign out</a>]
+    You are signed in as voter <u>{% if voter.alias %}{{voter.alias}}{% else %}{{voter.name}}{% endif %}</u> in election <u>{{voter.election.name}}</u>. [<a href="{{settings.SECURE_URL_HOST}}{% url "helios_auth.views.logout" %}?return_url={{CURRENT_URL}}">sign out</a>]
     {% else %}
 {% if settings.SHOW_LOGIN_OPTIONS %}
-    not logged in. <a class="tiny button" href="{{settings.SECURE_URL_HOST}}{% url helios_auth.views.index %}?return_url={{CURRENT_URL}}">log in</a>
+    not logged in. <a class="tiny button" href="{{settings.SECURE_URL_HOST}}{% url "helios_auth.views.index" %}?return_url={{CURRENT_URL}}">log in</a>
 {% else %}
 powered by <a href="http://heliosvoting.org">Helios Voting</a>.
 {% endif %}
diff --git a/server_ui/templates/confirm.html b/server_ui/templates/confirm.html
index fc33ce7597a1df1a8342d2219d92d2aee9ed2ec6..d98f65fef5c7e46b9e480cb206ea8dd6408a06b6 100644
--- a/server_ui/templates/confirm.html
+++ b/server_ui/templates/confirm.html
@@ -38,7 +38,7 @@ function show_waiting() {
 </form>
 
 <p>
-    Forgot your password? <a href="{% url helios_auth.auth_systems.password.password_forgotten_view %}?return_url={% url server_ui.views.cast_confirm %}">Have it emailed to you</a>.<br />(don't worry, we won't forget your vote).
+    Forgot your password? <a href="{% url "helios_auth.auth_systems.password.password_forgotten_view" %}?return_url={% url "server_ui.views.cast_confirm" %}">Have it emailed to you</a>.<br />(don't worry, we won't forget your vote).
 </p>
 </div>
 
diff --git a/server_ui/templates/done.html b/server_ui/templates/done.html
index f1bce76d12eacdcf3672c7f6bf871f6e9bbfe23e..47ff73fa6023c847ea8fb2425c5bfc56b01d36d2 100644
--- a/server_ui/templates/done.html
+++ b/server_ui/templates/done.html
@@ -11,7 +11,7 @@
 </p>
 
 <p>
-    Visit the <a href="{% url helios.views.one_election_view election.uuid %}">election homepage</a>.
+    Visit the <a href="{% url "helios.views.one_election_view" election.uuid %}">election homepage</a>.
 </p>
 
 {% endblock %}
diff --git a/server_ui/templates/election_tallied.html b/server_ui/templates/election_tallied.html
index c8e98d47865f93729e70d10e508f177e1ed3b745..747e083fc3d4ed3433000fd8b1edf5f41bd7364d 100644
--- a/server_ui/templates/election_tallied.html
+++ b/server_ui/templates/election_tallied.html
@@ -9,6 +9,6 @@
   </p>
   
   <p>
-      <a href="{% url helios.views.one_election_view election.uuid %}">view the election</a>
+      <a href="{% url "helios.views.one_election_view" election.uuid %}">view the election</a>
   </p>
 {% endblock %}
\ No newline at end of file
diff --git a/server_ui/templates/index.html b/server_ui/templates/index.html
index a2637ce9c67b6bdc78aa0b9350bc5f2cf3f7c4cf..2b0a0e2c44ebf541b8fbcdc1309b9d526148e852 100644
--- a/server_ui/templates/index.html
+++ b/server_ui/templates/index.html
@@ -28,7 +28,7 @@ More than <b>100,000 votes</b> have been cast using Helios.
 </p>
 
 {% if create_p %}
-<a class="button" href="{% url helios.views.election_new %}">create an election</a>
+<a class="button" href="{% url "helios.views.election_new" %}">create an election</a>
 {% endif %}
 
   {% else %}
@@ -40,7 +40,7 @@ More than <b>100,000 votes</b> have been cast using Helios.
   <p>
     {% for election in elections %}
     <div class="panel">
-      <a style="font-size: 1.4em;" href="{% url helios.views.election_shortcut election.short_name %}">{{election.name}}</a>{% if settings.SHOW_USER_INFO %}<br /> by {{election.admin.display_html_small|safe}}{% endif %}
+      <a style="font-size: 1.4em;" href="{% url "helios.views.election_shortcut" election.short_name %}">{{election.name}}</a>{% if settings.SHOW_USER_INFO %}<br /> by {{election.admin.display_html_small|safe}}{% endif %}
     </div>
     <br />
     {% endfor %}
@@ -58,19 +58,19 @@ More than <b>100,000 votes</b> have been cast using Helios.
 {% if user %}
 <!--<div class="row right">{{user.display_html_big|safe}}</div>-->
 {% if create_p %}
-<a class="small button" href="{% url helios.views.election_new %}">create election</a>
+<a class="small button" href="{% url "helios.views.election_new" %}">create election</a>
 <h5 class="subheader">Administration</h5>
 {% if elections_administered %}
 <ul>
 {% for election in elections_administered %}
-<li> <a href="{% url helios.views.one_election_view election.uuid %}">{{election.name}}</a></li>
+<li> <a href="{% url "helios.views.one_election_view" election.uuid %}">{{election.name}}</a></li>
 {% endfor %}
 </ul>
 {% else %}
 <em>none yet</em>
 {% endif %}
 <div class="row right">
-<a class="tiny button" href="{% url helios.views.elections_administered %}">see all</a>
+<a class="tiny button" href="{% url "helios.views.elections_administered" %}">see all</a>
 </div>
 <div class="row"></div>
 {% endif %}
@@ -79,13 +79,13 @@ More than <b>100,000 votes</b> have been cast using Helios.
 {% if elections_voted %}
 <ul>
 {% for election in elections_voted %}
-<li><a href="{% url helios.views.one_election_view election.uuid %}">{{election.name}}</a></li>
+<li><a href="{% url "helios.views.one_election_view" election.uuid %}">{{election.name}}</a></li>
 {% endfor %}
 </ul>
 {% else %}
 <em>none yet</em>
 {% endif %}
-<div class="row right"><a class="tiny button" href="{% url helios.views.elections_voted %}">see all</a></div>
+<div class="row right"><a class="tiny button" href="{% url "helios.views.elections_voted" %}">see all</a></div>
 <div class="row"></div>
 {% else %}
 {% if settings.SHOW_LOGIN_OPTIONS %}
diff --git a/server_ui/urls.py b/server_ui/urls.py
index 2554c6ee1d1a01cb5cff73698874d44a116cd684..d71e04dcac68008d2001ca99c7df7f055bd6404a 100644
--- a/server_ui/urls.py
+++ b/server_ui/urls.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-from django.conf.urls.defaults import *
+from django.conf.urls import *
 
 from views import *
 
diff --git a/urls.py b/urls.py
index c69f6bab18acd02739267c660900aada4cc782dc..d4674991451a72c154ae6d91bfdf5a0dd0bee8a1 100644
--- a/urls.py
+++ b/urls.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-from django.conf.urls.defaults import *
+from django.conf.urls import *
 from django.contrib import admin
 from django.conf import settings