Changeset - c795e1799c86
[Not reviewed]
0 1 0
Ben Sturmfels (bsturmfels) - 1 month ago 2024-03-20 03:42:10
ben@sturm.com.au
Move secrets.json to top-level
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
conservancy/settings/prod.py
Show inline comments
...
 
@@ -24,13 +24,13 @@ DATABASES = {
 
        'ENGINE': 'django.db.backends.sqlite3',
 
    }
 
}
 

	
 
# Apache/mod_wsgi doesn't make it straightforward to pass environment variables
 
# to Django (can't use the Apache config).
 
with open(BASE_DIR / 'secrets.json') as f:
 
with open(BASE_DIR.parent / 'secrets.json') as f:
 
    secrets = json.load(f)
 

	
 
def get_secret(secrets, setting):
 
    try:
 
        return secrets[setting]
 
    except KeyError:
0 comments (0 inline, 0 general)