Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

A simple Django-based administration interface for an election loader.

License

Notifications You must be signed in to change notification settings

newsdev/nyt-elections-admin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A really, really simple Django-based admin interface for our elections loader.

NOTE: This is substantially broken and will be in active development leading up to the November 3rd, 2015, general election. Use at your own risk.

Database

createdb elex
createuser elex
psql elex
alter user elex with superuser;

Python environment

mkvirtualenv nyt-elections-admin
git clone [email protected]:newsdev/nyt-elections-admin.git && cd nyt-elections-admin
pip install -r requirements.txt
add2virtualenv .
export DJANGO_SETTINGS_MODULE=config.dev.settings

Secrets / configuration

export AP_API_KEY              # Your AP API key
export ELEX_RECORDING=         # mongodb or flat. There are other options as well, but defaults to /tmp or local mongo.
export ELEX_LOGGING_URL=       # Your syslog URL, e.g., 127.0.0.1 or logs.papertrail.com
export ELEX_LOGGING_PORT=      # Your syslog port, e.g., 514 or 1111

Load data

Initial data

Initial data is only candidates, ballot positions and races. Does not run aggregates.

django-admin load_initial --date=2015-11-03

Global data

Global data loads the entire state of all races for this election. Does run aggregates. Will blow away edits to candidates and ballot positions.

django-admin load_initial --date=2015-11-03

Updates

Updates refreshes races, candidate results and reporting units. Does run aggregates. Will not blow away edits to candidates or ballot positions.

django-admin load_updates --date=2015-11-03

About

A simple Django-based administration interface for an election loader.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages