Nouabook is a fork of Votainteligente the electoral platform that Fundación Ciudadano Inteligente uses to transparent the electoral positions of different candidates to an election. So we reuse the explanation from Votainteligente in ciudadanointeligente/votainteligente-portal-electoral Github
#Installation
Nouabook depends on 3 parts candideit.org, popit and write-it. You might choose to use all of them or just part. In the following document it is described how to install.
This guide was made using an ubuntu.(you can work with windows but it's better to use a linux system)
Before the installation process is started a number of requirements is needed
- virtualenv
- virtualenvwrapper
- Git
- The requirements that sorl-thumbnail has
- Clone votainteligente somewhere in your system.
git clone https://github.com/adtidiane/Nouabook.git
Enter the installation directory
cd Nouabook
- Create a virtual environment
mkvirtualenv nouabook_env
- Install the requirements that votainteligente needs in the current virtualenvironment
pip install -r requirements.txt
It might take some time to get all installed
NB: if installation of requirements are not successfull you need to install them one by one.
example: pip install django-taggit
- Create the database and tables.
python manage.py syncdb
Update the DB with migrations
python manage.py migrate
create the migrations for elections app
python manage.py schemamigration elections --initial
Update the DB with migrations for elections app
python manage.py migrate elections
- Update Database concerning flatpages_i18n
You need to update the DB follow the instruction here at point 6.
Elections in VotaInteligente have a one-to-one relation with elections in candideit.org, so for your installation you'll first need to create an election in candideit.org and follow the next steps.
Specifically for this installation we are not using popit.
- Create the file votainteligente/local_settings.py with the following content.
USE_POPIT = False
CANDIDEITORG_URL = http://candideit.org/api/v2/'
CANDIDEITORG_USERNAME = 'YOUR-CANDIDEITORG-USERNAME'
CANDIDEITORG_API_KEY = 'YOUR-CANDIDEITORG-APIKEY'
- Getting your elections from candideit.org into your installation.
You need to run the following command
python manage.py update_from_candidator
- Running Nouabook
python manage.py runserver
And hit http://localhost:8000/.
The theme used is for nouabook. you can use it and modify it.
If you want to create a new theme you have to create a directory containing two different subdirectories templates and static, and copy the templates that you want to replace.
to use existing theme or new theme in your project, in your settings.py or local_settings.py file you have to add the following
STATICFILES_DIRS = (
'/full/path/to/your/theme/static/',
)
TEMPLATE_DIRS = (
'/full/path/to/your/theme/templates/',
)
you need to create and set up a new facebook app in developers part make it public, add the publish_actions
permission
to your app by sending request to be approved by facebook review team to allow everyone to use the permission.
If you don't get yet the permission the listed facebook profils in roles part of app (admin, developer, user test...) are able to use it and send messages. see More explanation in facebook developer part about review status.
Nouabook.ma of SimSim-Citizen Participation is available under the terms of the Creative Commons Attribution 4.0 License International.
Nouabook is based on VotaInteligente which is free and released as open source software covered by the terms of the GNU Public License (GPL v3)