Skip to content

A tool to represent the views of politicians and parties as a help to the voters.


Notifications You must be signed in to change notification settings


Repository files navigation


A tool to represent the views of politicans as a help to the voters.

Used in

How does it look?

This is how Freedomvote looked for the Swiss Election in 2015 -


The "hard" way


  • python 3
  • postgresql (for SQLite see note below)
  • libjpeg
  • zlib
  • python-pip

Run pip install -r requirements.txt to install all requirements.

Configure your DB settings and Secret in app/settings.ini: There is an example in the app/example.settings.ini

Please generate a new SECRET and don't commit it to your repository!

More infos about the Django Secret Django Secret

NAME = freedomvote
USER = freedomvote
PASS = ***********
PORT = 5432


Edit the tools/docker/cache_table.sql file to change your database user, and then run:

$ psql -h <db_host> -U <db_user> <db_name> < tools/docker/cache_table.sql
$ python app/ migrate
$ python app/ createsuperuser
$ python app/ runserver

Now you can access the frontend on http://localhost:8000

The easy way - Docker

To run Freedomvote in a docker container, you need to install docker and docker-compose and execute those commands:

$ make docker-init docker

Default user is admin with password 123qwe, to change this, run make docker-pw

Now you can access the frontend on http://localhost:8000

Development setup with SQLite

Add DJANGO_DEBUG=1 to your environment to use a local SQLite database instead of Postgres. Not all features of the application may be available, as this is only partially supported, but you will have a functioning instance.

Django management

Django already provides a number of management commands out of the box. Other parts of this document already lists the usages of some of these commands. Freedomvote provides a couple of custom commands to ease the setup process:

$ python app/ help
$ python app/ help <command>
$ python app/ generate_politicians 42
$ python app/ politician_import examples/politician_import.json
$ python app/ user_import examples/user_import.json


The whole application is multilingual. Per default the languages German, Italian and French are installed. The translation are located in app/locale/<lang_code>/LC_MESSAGES/django.po. After editing the translation, run python compilemessages

To install another language (English in this example) make the following steps:


  ('en', _('english')),

then create a new folder for the language:

$ mkdir app/locale/en

now run those commands in your environment:

$ python makemigrations
$ python migrate
$ python makemessages
$ python compilemessages

or with docker:

$ make docker-makemigrations
$ make docker-migrate
$ make docker-makemessages
$ make docker-compilemessages


We use for translation. If you want to help us to translate Freedomvote into your language, head over to and start working :)