Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • stustanet/wahlfang
  • 011892/wahlfang
  • 014449/wahlfang
  • 015384/wahlfang
4 results
Show changes
Showing
with 350 additions and 24 deletions
File moved
File moved
File moved
......@@ -134,3 +134,7 @@ table.vote-list .applicant .card-body {
.pic {
width: 100%;
}
.just {
text-align: justify;
}
......@@ -17,7 +17,7 @@
<div id="content">
<nav class="navbar navbar-expand navbar-dark bg-dark shadow">
<div class="container-md">
<a class="navbar-brand" href="{% url 'vote:index' %}">
<a class="navbar-brand" href="{% block back_url %}{% url 'vote:index' %}{% endblock %}">
<img src="{% static "img/logo_inv.png" %}" alt="StuStaNet">
</a>
<div class="navbar-text">Online Voting System</div>
......
......@@ -2,32 +2,206 @@
{% load static %}
{% load crispy_forms_filters %}
{% block back_url %}
{{ back_url }}
{% endblock %}
{% block content %}
<div class="row justify-content-center">
<div class="col-12">
<div class="card shadow">
<div class="card-header bg-dark text-light">
<h3 class="d-inline">Help Page</h3>
<h3 class="d-inline">Help Page - Voters</h3>
</div>
<div class="card-body">
{# todo fill in help text #}
<h4>Voter</h4>
{# Fill in information on how to vote and how votes are counted (abstention)#}
<p>{% lorem %}</p>
<h4>Manager</h4>
{# Fill in information on how to use the management page #}
{# * Reverence with link to the management site #}
{# * Explain (maybe with screenshots) how stustanet members can generate a password for wahlfang on their #}
{# accounts website #}
{# * Explain how one can create an election and what the fields mean #}
{# * Explain how one can add voters (email, anonymous and csv file) #}
<p>{% lorem %}</p>
<h3>Contents</h3>
<ol>
<li>Manual for the Vote Frontend
<ul>
<li>Ways to Get Invited to an Election</li>
<li>Election Overview Page
<ul>
<li>Election Results</li>
<li>Apply as Candidate</li>
</ul>
</li>
<li>Apply Page</li>
<li>Vote Page</li>
</ul>
</li>
<li>FAQ</li>
</ol>
<p class="just">The first part of this help page is a manual on how to navigate and operate the vote frontend.
(If you are
an election manager and want to have a manual on the management backend, visit
<a href="{% url 'management:help' %}">the management help page</a>). The second part in form of an FAQ will
answer questions on how the voting mechanism works and why you should prefer this tool instead of let's say
doodle.
</p>
<h2>Manual for the Vote Frontend</h2>
<h3>Ways to Get Invited to an Election</h3>
<p>There are three different ways to get invited to an election</p>
<ul class="just">
<li>Via E-Mail: You have to tell our election manager (the one who is hosting the election
e.g. your house representative) your email address. Our system will then send you an invitation
via email which contains a participation link. Upon opening that link you will directly be forwarded
to the voting interface. If you are not able to open the link then you can also enter the code in the
email into the text filed on <a href="{% url 'vote:index' %}">the voting website</a></li>
<li>
Via a personal letter: Your election manager will choose this open when he or she is too lazy to gather
all
email addresses and has too much money to spend on printing stuff.
The letter should be handed to you in paper form. It contains a QR code which
forwards you directly to the the voting interface. Alternatively, you can also open
<a href="{% url 'vote:index' %}">the voting website</a> and enter the code which is stated as "Access
token"
into input field.
</li>
<li>
Private access token: Last but not least, the election manager can also just download the access token and
spread them via a medium of hers or his choice. In that case you have to enter the token manually on
<a href="{% url 'vote:index' %}">the voting website</a>.
</li>
</ul>
<h3>Election Overview Page</h3>
<p class="just">
Once you are successfully logged in with your unique token you should see an overview page of all elections
categorized in "Open Elections", "Upcoming Elections", "Published Results" and "Closed Elections". Elections
are part of an election session e.g. some a general assembly of some association.
All elections in your session will be displayed in this overview page. Note, that
the election manager can at any time add new or delete old elections. An example screenshot is shown in the
following figure. Note that meeting links will be displayed in the header if the election manager enters
them.
</p>
<figure>
<img src="{% static 'img/example.png' %}" alt="Example" class="pic">
<figcaption>Example screenshot with caption.</figcaption>
<img src="{% static 'img/help_page/overview_page.png' %}" alt="Example" class="pic">
</figure>
<p>{% lorem %}</p>
<p class="just">
Open elections will have a blue button which forwards you to the election page. Page updates like the
activation
of an election should be done automatically, however, you can also just refresh the page in the browser.
</p>
<h4>Election Results</h4>
<p class="just">
When an election is over and the results are published the voting outcome will be shown in the overview page
under the section "Published Results".
Note that the election manager first needs to actively publish the results once the election is over.
</p>
<figure>
<img src="{% static 'img/help_page/overview_results.png' %}" alt="Example" class="pic">
</figure>
<h4>Apply as Candidate</h4>
<p class="just">If the election is configured accordingly it might be possible to apply as a candidate. If so
a black button
will appear on the right side of the card before the election starts (You can check the election period in
the upper part of the card when configured by the manager). Furthermore, you can see all applicants with
their
name, a photo and a short description why they want to be elected.
Check the next section to find out how to apply at an election and set those attributes for yourself.
</p>
<figure>
<img src="{% static 'img/help_page/overview_app.png' %}" alt="Example" class="pic">
</figure>
<h3>Apply Page</h3>
<p class="just">Once you clicked on the "Apply" button you will see the following page.</p>
<figure>
<img src="{% static 'img/help_page/apply_page_numbered.png' %}" alt="Example" class="pic">
</figure>
<ol class="just">
<li>Display name: The name that is displayed in the overview page along with the other candidate's names.
This must be provided to identify you.
</li>
<li>Email: You contact email, so that the election manager can contact you once you have been elected. In
case of the Houseadmin elections from StuStaNet we will use this email to put you onto an admin mail list.
Note that this email can be different from the one you received for the invitation link.
</li>
<li>Description: You can write a little description about why you want to apply for the position. However,
this is optional.
</li>
<li>Choose File: You can, if you want, upload a profile picture.</li>
<li>The submit button concludes your application. However, you can at any time until the election start
edit your application from the election overview.
</li>
</ol>
<p class="just">If you choose to add a description and picture they will be displayed in the election
overview.
You can always edit or delete your application in the election overview page once submitted.</p>
<h3>Vote Page</h3>
<figure>
<img src="{% static 'img/help_page/vote_page_bernd.png' %}" alt="Example" class="pic">
</figure>
<p class="just"> Once the election period started you can click on the <strong>Vote Now!</strong> button to
enter the vote page. An example election is shown above. You can select all applicants that you want
to give a <em>Yes</em> vote to. The admin might have limited the number of <em>Yes</em> votes you are
allowed to cast. <em>No</em> means that you are explicitly voting against the candidate. <em>Abstention</em>
means that you are not intended to participate in the votes for that candidate. Thus, an abstention vote
will not be counted for any side. Don’t forget to click the <strong>Submit</strong> button once you are done
to finalize casting your vote.
</p>
<h2>FAQ</h2>
<h3>How can I create a new election?</h3>
<p class="just">
You need to create a management account. For further details see the
<a href="{% url 'vote:index' %}">the management help page</a>.
</p>
<h3>Why is there a need for such a tool?</h3>
<p class="just">
During the 2020 Covid-19 pandemic there was a big need for an online voting tool for having fair elections
in the Studentenstadt Freimann (there are many events where elections are necessary).
Because other online voting tools seem insescure (see below), the StuStaNet decided to implement its own
system.<br>
Usually, during a session (say a general assembly of a student dormitory) there will be votes on multiple
things. Therefore
multiple votes are brought together into a session. This has the big advantage that the voters stay the same
and only one email per voter per session is necessary.<br>
The original version was created just for the purpose of the StuStaNet house admin elections and has then
been adapted to also work for general elections and also support sessions.
</p>
<h3>Why not just use Doodle?</h3>
<p class="just">The problem with doodle and most polling platforms is that they often have no mechanism build
in to prevent a person from voting again because users are not authenticated. This also means that they
do not check whether a user is even allowed to vote. Some platforms have a configuration which allows
only one vote per IP address. This, however, is no solution if several users hide behind the same NAT.<br>
Then there are also real voting platforms that promise real authenticity and anonymity. However, they
are often foreign companies that store your data probably not in your country and you have to trust them on
their technology as well as the deletion process once the election is over. </p>
<h3>What is Wahlfang, how can I contribute?</h3>
<p class="just">Wahlfang is the software behind {% url 'vote:index' %}. It is open source with the source code
available on
<a href="https://github.com/stustanet/wahlfang">github</a>. It was developed and is currently maintained
by the <a href="https://stustanet.de">StuStaNet e.V.</a> a student association which committed itself to
host and maintain the network infrastructure of the largest student dormitory in munich, the
<a href="https://www.stusta.de">StuSta</a>. If you live in the StuSta and are wanting to actively
participate
in our society check our website linked above.
<br>If you are interested to contribute to this project see the questions below.
<br>The name Wahlfang itself is pun of the german words Wahl, Fang and Walfang. Wahl means Election and
Walfang means hunting wahles, thus the election the Wahl (instead of the wahle) is in the net referring to
the
internet.
</p>
<h3>How to host my own shiny instance of Wahlfang?</h3>
<p class="just">Since Wahlfang is an opensource software you can host your own instance if you don't trust us.
There is a <a href="https://github.com/stustanet/wahlfang/blob/master/docs/deploying.md">deploy page</a>
on our <a href="https://github.com/stustanet/wahlfang">public github repository</a>.
</p>
</div>
</div>
......
## How does voting work?
Once you are part of an election session, you should have gotten an email to the mail address that the session creator (usually the election/meeting leader) has entered for you.
If you didn't get the mail please take a look in your Spam folder and if it's not there talk to the session creator.
This mail contains a link that you can use to access the voting session.
Furthermore, a code is provided that you can enter on visiting [vote.stustanet.de](vote.stustanet.de).
### Vote Overview Page
When there was already an election created, you will be greeted with a screen similar to this one:
![](../../../static/img/help_page/vote_waiting.png)
If enabled by the session creator, you will be able to apply by clicking the grey **apply** button in the upper right corner of the image.
Once the admin started the election, a blue *Vote Now!* button will appear (you might have to refresh the site) which you can click to open the voting page.
### Voting page
![](../../../static/img/help_page/vote_page.png)
You can select all applicants that you want to give a *Yes* vote to.
The admin might have limited the number of *Yes* votes you are allowed to cast.
Don't forget to click the **Submit** button once you are done to finalize casting your vote.
### Apply page
If you want to apply for the election you and it's enabled, you can go to the overview page and click on the grey **Apply** button.
![](../../../static/img/help_page/vote_apply.png)
There will be a new page where you can choose a Display Name that will be shown to other people when they cast their votes.
Furthermore you can give a contact mail and a short description about yourself and also upload a picture.
Press **Submit** once you are done to apply for the election.
You can always edit your application given that the election hasn't started yet by clicking **Edit Application** or **Delete Application** in the overview page.
## How can I create a new election?
### Getting a management account
Before you are able to access the admin page, you will need a management account first.
Please send a mail to [vorstand@stustanet.de](mailto:vorstand@stustanet.de) to get a management account.
Now, visit https://vote.stustanet.de/management/ and use your credentials to log in.
### Creating a new session
On https://vote.stustanet.de/management/ there should be a big green **Create Session**. Click it.
### Create an election
### Adding applicants
## I have a problem/idea/want to contribute
## What is this all about?
[vote.stustanet.de](vote.stustanet.de) is an application that allows creating and managing secure elections and participate in them.
It was created and is maintained by the administrators of the [StuStaNet e.V.](https://stustanet.de)
### Why?
During the 2020 Covid-19 pandemic there was a big need for an online voting tool for having fair elections in the Studentenstadt Freimann (there are many events where elections are necessary).
Because other online voting tools seem insescure (see below), the StuStaNet decided to implement its own system.
### How?
vote.stustanet.de uses emails to send personal links to each voter. These mails can then be used to vote.
Usually, during a session (say a Hausvollversammlung) there will be votes on multiple things. Therefore mutliple votes are brought together into a session. This has the big advantage that the voters stay the same and only one email per voter per session is necessary.
### Why don't you just use strawpoll, doodle, ...
Creating secure online elections is a non-trivial task.
*How can you be sure that only the people allowed to vote participate?*
*How can you be sure that no one votes twice (e.g. via a second account or by reloading the site)?*
Most online voting tools consist of a single link that each voter can use to access a webpage where they can cast their vote. Nothing stops voters to share the link with other people.
vote.stustanet.de solves this problem by sending each voter a personal access link where it's only possible to vote once for each election.
*How can you be sure that the election host doesn't access your data/keeps the data after the election?*
Many online election tools are based in foreign countries and often have an incentive to gain money by tracing your activities online and placing ads.
The administrators of StuStaNet e.V. are volunteers that you might know in person. All election data is deleted once a session is removed. The source code of vote.stustanet.de is open source and available [here](https://github.com/stustanet/wahlfang).
__version__ = '1.0.1'
......@@ -7,16 +7,16 @@ For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'wahlfang.settings')
from wahlfang.manage import setup
setup()
django_asgi_application = get_asgi_application()
from channels.auth import AuthMiddlewareStack
from channels.routing import ProtocolTypeRouter, URLRouter
import wahlfang.routing
from channels.auth import AuthMiddlewareStack # pylint: disable=wrong-import-order
from channels.routing import ProtocolTypeRouter # pylint: disable=wrong-import-order
import wahlfang.routing # pylint: disable=wrong-import-order
application = ProtocolTypeRouter({
"https": django_asgi_application,
......
......@@ -2,12 +2,35 @@
"""Django's command-line utility for administrative tasks."""
import os
import sys
from pathlib import Path
def setup():
"""Setup environment for wahlfang"""
if os.getenv('DJANGO_SETTINGS_MODULE') is not None:
return
if os.getenv('WAHLFANG_DEBUG'):
os.environ['DJANGO_SETTINGS_MODULE'] = 'wahlfang.settings.development'
return
wahlfang_config = os.getenv('WAHLFANG_CONFIG', '/etc/wahlfang/settings.py')
if not os.path.exists(wahlfang_config):
print(f'Wahlfang configuration file at {wahlfang_config} does not exist', file=sys.stderr)
print('Modify "WAHLFANG_CONFIG" environment variable to point at settings.py', file=sys.stderr)
sys.exit(1)
config_path = Path(wahlfang_config).resolve()
sys.path.append(str(config_path.parent))
os.environ['DJANGO_SETTINGS_MODULE'] = config_path.stem
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'wahlfang.settings')
setup()
try:
from django.core.management import execute_from_command_line
from django.core.management import execute_from_command_line # pylint: disable=import-outside-toplevel
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
......