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

fixed for generic server, updated helios for large num voters

parent 650e7b40
No related branches found
No related tags found
No related merge requests found
Subproject commit 95eb27464e8850963f65177c8426ace0920f6430 Subproject commit 9785977b0c97397e91622b9b1fa58561c4ed4e9f
...@@ -11,7 +11,6 @@ import auth.models ...@@ -11,7 +11,6 @@ import auth.models
helios.TEMPLATE_BASE = "server_ui/templates/base.html" helios.TEMPLATE_BASE = "server_ui/templates/base.html"
helios.ADMIN_ONLY = True helios.ADMIN_ONLY = True
helios.ADMIN = auth.models.User.update_or_create(user_type = 'cas', user_id = 'yaro', info={})
# authentication limited to passwords # authentication limited to passwords
auth.ENABLED_AUTH_SYSTEMS = ['cas', 'password'] auth.ENABLED_AUTH_SYSTEMS = ['cas', 'password']
......
...@@ -45,7 +45,9 @@ ...@@ -45,7 +45,9 @@
</div> </div>
<div id="footer"> <div id="footer">
<span style="float:right;"> <span style="float:right;">
{% if settings.FOOTER_LOGO %}
<img src="/static/footer-logo.gif" /> <img src="/static/footer-logo.gif" />
{% endif %}
</span> </span>
{% if user %} {% if user %}
logged in as {{user.user_id}} [<a href="{% url auth.views.logout %}">logout</a>]<br /> logged in as {{user.user_id}} [<a href="{% url auth.views.logout %}">logout</a>]<br />
......
...@@ -18,6 +18,12 @@ ...@@ -18,6 +18,12 @@
</p> </p>
--> -->
{% if create_p %}
<a href="{% url helios.views.election_new %}">create election</a>
|
<a href="{% url helios.views.elections_administered %}">elections you administer</a>
{% endif %}
<p style="font-size: 1.4em;"> <p style="font-size: 1.4em;">
Current Elections: Current Elections:
<ul> <ul>
...@@ -27,4 +33,5 @@ Current Elections: ...@@ -27,4 +33,5 @@ Current Elections:
</ul> </ul>
</p> </p>
{% endblock %} {% endblock %}
...@@ -10,6 +10,7 @@ import helios.views ...@@ -10,6 +10,7 @@ import helios.views
import helios import helios
from helios.crypto import utils as cryptoutils from helios.crypto import utils as cryptoutils
from auth.security import * from auth.security import *
from helios.security import can_create_election
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect, Http404, HttpResponseNotAllowed from django.http import HttpResponse, HttpResponseRedirect, Http404, HttpResponseNotAllowed
...@@ -24,7 +25,9 @@ def home(request): ...@@ -24,7 +25,9 @@ def home(request):
# load the featured elections # load the featured elections
featured_elections = Election.get_featured() featured_elections = Election.get_featured()
return render_template(request, "index", {'elections': featured_elections}) create_p = can_create_election(request)
return render_template(request, "index", {'elections': featured_elections, 'create_p':create_p})
def about(request): def about(request):
return HttpResponse(request, "about") return HttpResponse(request, "about")
......
...@@ -147,4 +147,5 @@ SINGLE_ELECTION_PARAMS = { ...@@ -147,4 +147,5 @@ SINGLE_ELECTION_PARAMS = {
# FOOTER links # FOOTER links
FOOTER_LINKS = [{'url':'http://usg.princeton.edu/elections', 'text':'USG Elections Center'}] FOOTER_LINKS = [{'url':'http://usg.princeton.edu/elections', 'text':'USG Elections Center'}]
FOOTER_LOGO = False
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment