This project produces server-rendered HTML pages for the Water Quality Portal.
- Create a virtualenv and install the project's Python requirements.
virtualenv --python=python3.6 env
env/bin/pip install -r requirements.txt
- To override any Flask configuration parameters, modify
instance/config.py
. These will override any values in the project'sconfig.py
. There is a sample available:
mkdir -p instance
cp config.py.sample instance/config.py
To run the Flask development server at http://localhost:5050:
env/bin/python run.py
If you want to run with https (which is needed if authorization is enabled), you will need to create a self-signed certificate and private key. See https://blog.miguelgrinberg.com/post/running-your-flask-application-over-https for reference. Run the developement server as follows (
env/bin/python run.py --certfile path/to/certfile --privatekeyfile part/to/private/key/file
The Python tests can be run as follows:
env/bin/python -m unittest