Candideit.org is a simple application that aims to provide comparable information about the positions of candidates to any election.
The living application can be found at www.candideit.org
-
In ubuntu is as easy as ``` sudo apt-get install virtualenvwrapper ```
If you are using ubuntu 12.04 you can follow this guide.
Create a python virtualenvironment
mkvirtualenv candideit
Clone the project from our repo
git clone git@github.com:ciudadanointeligente/candidator.git candidator
Enter the directory
cd candidator
If you are going to be developing candideit you should move to the dev branch
git checkout dev
Install dependencies.
pip install -r requirements.txt
Run tests
python manage test elections
It runs all tests in the elections application
Sync database
python manage syncdb
We are using sqlite3 to store all the data but if you would like to use another database you are free to do so, and it can be changed in 'settings.py'.
Run the application
python manage runserver
It is due to PIL not installed with JPEG support you can follow this guide.
-
To run all tests
python manage test elections
-
To check code coverage
python manage.py test_coverage elections
If you run python manage.py runserver
and open http://127.0.0.1:8000/
you should see the Spanish version in your browser.
Create a local_settings.py
file, and edit settings as appropriate:
cp local_settings.py.example local_settings.py
The following commands assume your locale code is en
. Replace it as appropriate with the ISO 639-1 code for your locale. The locale code you choose below must match the LANGUAGE_CODE
in local_settings.py
.
First, create or update the django.po
file for your locale:
django-admin.py makemessages -l en
You will find the file in locale/en/LC_MESSAGES
. You can now edit the .po
file by hand or with a variety of editors.
You may prefer to use Transifex to translate the .po
file:
- Go to Candideit's Transifex page
- Click "Add new translation"
- Select your language and click "Translate online"
Once your translations are done, notify a Candideit maintainer, and they can pull your translations into the project.
- Keep the same case: translate "NOMBRE DE LA ELECCIÓN:" as "ELECTION NAME:" not "Election name:"
- Keep all punctuation: translate "NOMBRE DE LA ELECCIÓN:" as "ELECTION NAME:" not "ELECTION NAME"
To use your translation, you need to compile the .po
file to a .mo
file:
python manage.py compilemessages