Personalised investment report API - the Department for International Trade (DIT)
$ git clone https://github.com/uktrade/invest-pir-api
$ cd invest-pir-api
$ virtualenv .venv -p python3.6
$ source .venv/bin/activate
$ pip install -r requirements_test.txt
# Start postgres now before proceeding.
$ make debug_db
$ make debug_migrate
$ make debug_createsuperuser
Python 3.6 Postgres 9.5 Redis server Cairo Pango GNU Gettext
$ make debug_test
Default: True.
Restrict admin to particular IP addresses
Default: []
Restrict to these IP addresses
Default: None
Default: 10
How many times a user can fail their password before the "please contact an admin" screen appears
Default: 24 (hours)
How long until a user at an IP address can retry
Default: None
When a user enters their password more than allowed. They are presented with a screen asking an admin to unlock their account again. They enter their email, and an admin is emailed. The RESET_EMAIL is said admin's email.
Default: None
Default: None
Tuple of moderatorsโ email addresses to which notifications will be sent.
Default: abc
Hawk authentication key
Credentials for the gov email service
ID of email with report.
ID of email with default report.
Where the corresponding URL for the frontend is.
Static and media files
- AWS_STORAGE_BUCKET_NAME
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_DEFAULT_REGION
Only for PDFs
- AWS_S3_PDF_STORE_ACCESS_KEY_ID
- AWS_S3_PDF_STORE_SECRET_ACCESS_KEY
- AWS_S3_PDF_STORE_BUCKET_NAME
- AWS_S3_PDF_STORE_BUCKET_REGION
We use SASS CSS pre-compiler. If you're doing front-end work your local machine will also need the following dependencies:
Then run:
$ npm install
We add compiled CSS files to version control. This will sometimes result in conflicts if multiple developers are working on the same SASS files. However, by adding the compiled CSS to version control we avoid having to install node, npm, node-sass, etc to non-development machines.
You should not edit CSS files directly, instead edit their SCSS counterparts.
$ make compile_css
https://github.com/uktrade?q=directory https://github.com/uktrade?q=great