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

moved things to make python happy, added a few details

parent aff7100a
No related branches found
No related tags found
No related merge requests found
Showing
with 16 additions and 16 deletions
...@@ -19,13 +19,13 @@ handlers: ...@@ -19,13 +19,13 @@ handlers:
secure: always secure: always
- url: /static - url: /static
static_dir: server-ui/media static_dir: server_ui/media
secure: always secure: always
# this overrides the style for the booth # this overrides the style for the booth
# without having to fork the code # without having to fork the code
- url: /booth/css - url: /booth/css
static_dir: server-ui/media/boothcss static_dir: server_ui/media/boothcss
secure: always secure: always
- url: /booth - url: /booth
......
...@@ -7,9 +7,9 @@ import helios ...@@ -7,9 +7,9 @@ import helios
import auth import auth
import auth.models import auth.models
#from server-ui import glue #from server_ui import glue
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.get_or_create(user_type = 'cas', user_id = 'yaro', info={}) helios.ADMIN = auth.models.User.get_or_create(user_type = 'cas', user_id = 'yaro', info={})
......
File moved
...@@ -9,7 +9,7 @@ import helios.views, helios.signals ...@@ -9,7 +9,7 @@ import helios.views, helios.signals
import views import views
def vote_cast_update_status(user, voter, election, cast_vote, **kwargs): def vote_cast_send_message(user, voter, election, cast_vote, **kwargs):
# prepare the message # prepare the message
subject = "%s - vote cast" % election.name subject = "%s - vote cast" % election.name
...@@ -21,7 +21,7 @@ You have successfully cast a vote in ...@@ -21,7 +21,7 @@ You have successfully cast a vote in
Your ballot tracking number is: Your ballot tracking number is:
%s %s
""" % (election.name, cast_vote.vote_hash """ % (election.name, cast_vote.vote_hash)
if election.use_voter_aliases: if election.use_voter_aliases:
body += """ body += """
...@@ -39,7 +39,7 @@ Your voter alias is : %s ...@@ -39,7 +39,7 @@ Your voter alias is : %s
# send it via the notification system associated with the auth system # send it via the notification system associated with the auth system
user.send_message(subject, body) user.send_message(subject, body)
helios.signals.vote_cast.connect(vote_cast_update_status) helios.signals.vote_cast.connect(vote_cast_send_message)
def election_tallied(election, **kwargs): def election_tallied(election, **kwargs):
pass pass
......
File moved
File moved
File moved
File moved
{% extends 'server-ui/templates/base.html' %} {% extends 'server_ui/templates/base.html' %}
{% block title %}Confirm Vote{% endblock %} {% block title %}Confirm Vote{% endblock %}
{% block content %} {% block content %}
...@@ -38,7 +38,7 @@ function show_waiting() { ...@@ -38,7 +38,7 @@ function show_waiting() {
</form> </form>
<p> <p>
Forgot your password? <a href="{% url 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 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> </p>
</div> </div>
......
{% extends 'server-ui/templates/base.html' %} {% extends 'server_ui/templates/base.html' %}
{% block title %}Confirm Vote{% endblock %} {% block title %}Confirm Vote{% endblock %}
{% block content %} {% block content %}
......
{% extends 'server-ui/templates/base.html' %} {% extends 'server_ui/templates/base.html' %}
{% block content %} {% block content %}
......
{% extends 'server-ui/templates/base.html' %} {% extends 'server_ui/templates/base.html' %}
{% block title %}{{ settings.SITE_TITLE }}{% endblock %} {% block title %}{{ settings.SITE_TITLE }}{% endblock %}
{% block header %} {% block header %}
......
File moved
...@@ -26,5 +26,5 @@ def render_template(request, template_name, vars = {}): ...@@ -26,5 +26,5 @@ def render_template(request, template_name, vars = {}):
if request.session.has_key('csrf_token'): if request.session.has_key('csrf_token'):
vars_with_user['csrf_token'] = request.session['csrf_token'] vars_with_user['csrf_token'] = request.session['csrf_token']
return render_to_response('server-ui/templates/%s.html' % template_name, vars_with_user) return render_to_response('server_ui/templates/%s.html' % template_name, vars_with_user)
""" """
server-ui specific views server_ui specific views
""" """
from helios.models import * from helios.models import *
......
...@@ -117,7 +117,7 @@ INSTALLED_APPS = ( ...@@ -117,7 +117,7 @@ INSTALLED_APPS = (
'appengine_django', 'appengine_django',
'auth', 'auth',
'helios', 'helios',
'server-ui', 'server_ui',
) )
......
...@@ -5,5 +5,5 @@ from django.contrib import admin ...@@ -5,5 +5,5 @@ from django.contrib import admin
urlpatterns = patterns('', urlpatterns = patterns('',
(r'^auth/', include('auth.urls')), (r'^auth/', include('auth.urls')),
(r'^helios/', include('helios.urls')), (r'^helios/', include('helios.urls')),
(r'^', include('server-ui.urls')), (r'^', include('server_ui.urls')),
) )
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment