elex-admin
is a lightweight, Flask-based CRUD admin for election results data loaded with elex-loader and elex.
- Set up software and environment.
git clone git@github.com:newsdev/elex-admin.git && cd elex-admin
mkvirtualenv elex-admin
pip install -r py3.requirements.txt
- Duplicate the most recent racedate.ini file in
elex_admin/
. Name it with your new racedate. - In that file, increment the
http-socket
port by 1 (eg.127.0.0.1:8047
->127.0.0.1:8048
) - Edit
elex_admin/races.conf
: Duplicate the lastlocation {}
object and change the racedate andproxy_pass
port number to match the settings in the.ini
file you just made. - Then run these commands:
workon elex-admin
fab e:stg master pull
fab e:prd master pull
You'll then want to go run the elex-dotfiles commands to turn on the new racedate in the admin.
- This project requires Adcom for its theme. You can deploy Adcom to a CDN like Amazon S3 and then specify the root of the URL in an environment variable.
export RACEDATE=2016-02-01
export ELEX_ADMIN_CDN_URL=http://my.cdn.url.com/cdn
-
Run
bootstrap.sh
,init.sh
andupdate.sh
from elex-loader. -
Run
python elex_admin/initialize_racedate.py
to set up candidates and races for overrides. -
Run the admin.
python -m elex_admin.app