Skip to content

KAIROS is a Voting Advice Application (VAA) which is developed and provided as an open source software. It allows you to run your own VAA with the views of politicians and parties to questions of a specific topic as a help to the voters.

License

Notifications You must be signed in to change notification settings

politmedia/KAIROS

 
 

Repository files navigation

KAIROS

KAIROS is a Voting Advice Application (VAA) which is developed and provided as an open source software. It allows you to run your own VAA with the views of politicians and parties to questions of a specific topic as a help to the voters.

KAIROS is a fork of Freedomvote with additional features. It is powered by PolitMedia. For more information, see KAIROS.SOFTWARE.

Used in

How does it look?

This is how KAIROS looked for the Swiss Election in 2015 - freedomvote.ch

kairos.ch

Installation

The "hard" way

Requirements:

  • 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

[DB]
NAME = kairos
USER = kairos
PASS = ***********
PORT = 5432
HOST = 127.0.0.1

[GLOBAL]
SECRET = GENERATE A SECRET

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/manage.py migrate
$ python app/manage.py createsuperuser
$ python app/manage.py runserver

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

The easy way - Docker

To run KAIROS 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. KAIROS provides a couple of custom commands to ease the setup process:

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

Languages

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 manage.py compilemessages

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

app/kairos/settings.py

LANGUAGES = (
  ...
  ...
  ('en', _('english')),
)

then create a new folder for the language:

$ mkdir app/locale/en

now run those commands in your environment:

$ python manage.py makemigrations
$ python manage.py migrate
$ python manage.py makemessages
$ python manage.py compilemessages

or with docker:

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

Translation

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

License

GPLv3 see LICENSE

About

KAIROS is a Voting Advice Application (VAA) which is developed and provided as an open source software. It allows you to run your own VAA with the views of politicians and parties to questions of a specific topic as a help to the voters.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 48.9%
  • HTML 23.7%
  • CSS 16.4%
  • JavaScript 10.0%
  • Makefile 0.7%
  • Dockerfile 0.3%