Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Helios Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Helios Server
Commits
2cccb148
Commit
2cccb148
authored
15 years ago
by
Ben Adida
Browse files
Options
Downloads
Patches
Plain Diff
a number of fixes for voting start and end times
parent
092c9f21
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
helios
+1
-1
1 addition, 1 deletion
helios
server-ui/glue.py
+30
-2
30 additions, 2 deletions
server-ui/glue.py
server-ui/templates/index.html
+3
-2
3 additions, 2 deletions
server-ui/templates/index.html
server-ui/views.py
+1
-1
1 addition, 1 deletion
server-ui/views.py
with
35 additions
and
6 deletions
helios
@
609753a5
Compare
58dbb348
...
609753a5
Subproject commit
58dbb348771a05d4a5d07f990b44f9ed98514c5
d
Subproject commit
609753a5117ceb5d3b39b8dff9e97270a17f5a2
d
This diff is collapsed.
Click to expand it.
server-ui/glue.py
+
30
−
2
View file @
2cccb148
...
@@ -4,12 +4,40 @@ Glue some events together
...
@@ -4,12 +4,40 @@ Glue some events together
from
django.conf
import
settings
from
django.conf
import
settings
from
django.core.urlresolvers
import
reverse
from
django.core.urlresolvers
import
reverse
from
django.conf
import
settings
import
helios.views
,
helios
.
signals
import
helios.views
,
helios
.
signals
import
views
import
views
def
vote_cast_update_status
(
user
,
election
,
cast_vote
,
**
kwargs
):
def
vote_cast_update_status
(
user
,
voter
,
election
,
cast_vote
,
**
kwargs
):
pass
# prepare the message
subject
=
"
%s - vote cast
"
%
election
.
name
body
=
"""
You have successfully cast a vote in
%s
Your ballot tracking number is:
%s
"""
%
(
election
.
name
,
cast_vote
.
vote_hash
if
election
.
use_voter_aliases
:
body
+=
"""
This election uses voter aliases to protect your privacy.
Your voter alias is : %s
"""
%
voter
.
alias
body
+=
"""
--
%s
"""
%
settings
.
SITE_TITLE
# send it via the notification system associated with the auth system
user
.
send_message
(
subject
,
body
)
helios
.
signals
.
vote_cast
.
connect
(
vote_cast_update_status
)
helios
.
signals
.
vote_cast
.
connect
(
vote_cast_update_status
)
...
...
This diff is collapsed.
Click to expand it.
server-ui/templates/index.html
+
3
−
2
View file @
2cccb148
...
@@ -11,17 +11,18 @@
...
@@ -11,17 +11,18 @@
Welcome to the {{settings.SITE_TITLE}} system!
Welcome to the {{settings.SITE_TITLE}} system!
</p>
</p>
<!--
<p>
<p>
Helios is a revolutionary voting system that empowers voters to verify that their votes were correctly tallied.<br />
Helios is a revolutionary voting system that empowers voters to verify that their votes were correctly tallied.<br />
Learn more about Helios, and why secure voting matters, <a href="http://heliosvoting.org">here</a>.
Learn more about Helios, and why secure voting matters, <a href="http://heliosvoting.org">here</a>.
</p>
</p>
-->
<p
style=
"font-size: 1.4em;"
>
<p
style=
"font-size: 1.4em;"
>
Current Elections:
Current Elections:
<ul>
<ul>
{% for election in elections %}
{% 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.election_
shortcut
election.
short_name
%}"
>
{{election.name}}
</a></li>
{% endfor %}
{% endfor %}
</ul>
</ul>
</p>
</p>
...
...
This diff is collapsed.
Click to expand it.
server-ui/views.py
+
1
−
1
View file @
2cccb148
...
@@ -22,7 +22,7 @@ def get_election():
...
@@ -22,7 +22,7 @@ def get_election():
def
home
(
request
):
def
home
(
request
):
# load the featured elections
# load the featured elections
featured_elections
=
[
Election
.
get_by_
key_name
(
uuid
)
for
uuid
in
settings
.
FEATURED_ELECTION
_UUID
S
]
featured_elections
=
[
Election
.
get_by_
short_name
(
short_name
)
for
short_name
in
settings
.
FEATURED_ELECTIONS
]
featured_elections
=
[
e
for
e
in
featured_elections
if
e
!=
None
]
featured_elections
=
[
e
for
e
in
featured_elections
if
e
!=
None
]
return
render_template
(
request
,
"
index
"
,
{
'
elections
'
:
featured_elections
})
return
render_template
(
request
,
"
index
"
,
{
'
elections
'
:
featured_elections
})
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment