README
================
Fedora Elections
===============

* What is fedora-election?
fedora-elections is a web application written in python and based on flask.
It implements the Range Voting system (http://rangevoting.org).

This project was developed using fedoraproject requests, but, can be easily
adapted to other projects.  Fedora-elections is integrated with the Fedora
Account System (FAS).


Running from a checkout:
=======================

Install Prerequisites
---------------------
Before launching fedora-elections, the following packages should be installed:
 - httpd
 - libxslt
 - python
 - python-backports-ssl_match_hostname
 - python-bunch
 - python-chardet
 - python-fedora
 - python-fedora-flask
 - python-flask
 - python-flask-sqlalchemy
 - python-flask-wtf
 - python-jinja2
 - python-kitchen
 - python-lxml
 - python-openid
 - python-ordereddict
 - python-ordereddict
 - python-setuptools
 - python-simplejson
 - python-six
 - python-sqlalchemy0.7
 - python-urllib3
 - python-wtforms


Get the source code
-------------------
You can obtain the code from github:
        https://github.com/fedora-infra/elections.git

git clone https://github.com/fedora-infra/elections.git


Configure the application
-------------------------
cd fedora_elections
../configure.py  --install-conf=${PWD%/*}  --install-data=${PWD%/*}  --shared-state=${PWD%/*}

This will create createdb, fedora-elections.cfg, fedora-elections.wsgi and
http-fedora-elections.conf.

Modify fedora-elections.cfg to change FAS_PASSWORD to the correct password.

Create a database
-----------------
Copy development.cfg.sample to development.cfg.
Review the file and make changes as appropriate.
Run:
    ./createdb


Starting the Application
------------------------

There are 2 ways to start the application:
   o without http
   o with http


* How to start without http on localhost:5000:
    cd elections
    ./runserver


* How to start with http
  Next copy the httpd-pkgdb.conf file to your apache conf.d directory:

    sudo cp httpd-fedora-elections.conf /etc/httpd/conf.d/.

  Restart apache:

    sudo /etc/init.d/httpd  restart

* How to contribute
If you find bug or want to propose ideas or stuff to be implemented or if
you are interested to became a developer for this project just
ask on #fedora-admin irc channel on irc.freenode.net or use our
web site https://fedorahosted.org/elections.

* Licence
fedora-elections is licenced under GPL v2.