1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00
Files
peeringdb-peeringdb/docs/dev/settings.md

20 lines
635 B
Markdown
Raw Normal View History

## Location
Settings are defined in `/mainsite/settings/__init__.py`
Environments may also override settings by specifying their own file (e.g., `/mainsite/settings/dev.py`)
Environments may also override settings by exporting them as environment variables.
```sh
export GOOGLE_GEOLOC_API_KEY=abcde
```
## Adding new settings
When adding a setting use the `set_from_env` and the `set_option` wrappers to do so.
These ensure that the overrides mentioned above are functional. Use `set_from_env` for variables you anticipate are definitely going to be overridden on a per environment basis.
Use `set_option` for everything else.