Manage electoral race ratings, the POLITICO way.
Project description
politico-civic-race-ratings
TK TK TK, the POLITICO way.
Quickstart
- Install the app.
$ pip install politico-civic-race-ratings
- Add the app to your Django project settings.
INSTALLED_APPS = [
# ...
'rest_framework',
'entity',
'geography',
'election'
'government',
'raceratings',
]
- Migrate the database.
$ python manage.py migrate
Developing
Running a development server
Move into the example directory, install dependencies and run the development server with pipenv.
$ cd example
$ pipenv install
$ pipenv run python manage.py runserver
Setting up a PostgreSQL database
- Run the make command to setup a fresh database.
$ make database
- Make a copy of the
example/.env.example
file and save it asexample/.env
.
$ cp example/.env.example example/.env
- Add a connection URL to
example/.env
.
DATABASE_URL="postgres://localhost:5432/raceratings"
- Run migrations from the example app.
$ cd example
$ pipenv run python manage.py migrate
Configuration
The below configuration is automatically read from a .env
file in the project's root during local development. When in production, these variables are read from environment variables on the server.
More details about what each variable does will be added shortly.
Variable name | What it does | Default value |
---|---|---|
RACE_RATINGS_AUTH_DECORATOR |
Description TK. | `'django.contrib.auth.decorators.login_required' |
RACE_RATINGS_SECRET_KEY |
Description TK. | "" |
RACE_RATINGS_AWS_ACCESS_KEY_ID |
Description TK. | None |
RACE_RATINGS_AWS_SECRET_ACCESS_KEY |
Description TK. | None |
RACE_RATINGS_AWS_REGION |
Description TK. | None |
RACE_RATINGS_AWS_S3_BUCKET |
Description TK. | None |
RACE_RATINGS_CLOUDFRONT_ALTERNATE_DOMAIN |
Description TK. | None |
RACE_RATINGS_S3_UPLOAD_ROOT |
Description TK. | uploads/raceratings |
RACE_RATINGS_AWS_S3_STATIC_ROOT |
Description TK. | "https://s3.amazonaws.com" |
Copyright
© 2019–present POLITICO, LLC
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file politico-civic-race-ratings-1.0a5.dev3.tar.gz
.
File metadata
- Download URL: politico-civic-race-ratings-1.0a5.dev3.tar.gz
- Upload date:
- Size: 887.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0108464305175525e6a648dd135c1a0e477a92512ed80e667c4ac32f4a441fad |
|
MD5 | 6dbffef10700a5db63fd251b69a1bc8b |
|
BLAKE2b-256 | 5755ce6d07e545fc1c31a15cb879d4153b50274fdf858fc1c0febc24bedf9a9d |
File details
Details for the file politico_civic_race_ratings-1.0a5.dev3-py2-none-any.whl
.
File metadata
- Download URL: politico_civic_race_ratings-1.0a5.dev3-py2-none-any.whl
- Upload date:
- Size: 926.1 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef289f0a11760f84089de478743ec2669871772e559511ffd693bc69460df67b |
|
MD5 | 843ae6c20739e674e6911f4541f7a331 |
|
BLAKE2b-256 | e8b3903e08d2f858903fdc66854706b5f5edbb6331a26504628bca3f3c7456bd |