From 143a4a6e8c70557710d1b207a176f169d145ed1e Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sat, 12 Nov 2022 22:10:06 -0700 Subject: Start some settings work --- takahe/settings/production.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 takahe/settings/production.py (limited to 'takahe/settings/production.py') diff --git a/takahe/settings/production.py b/takahe/settings/production.py new file mode 100644 index 0000000..2f943f4 --- /dev/null +++ b/takahe/settings/production.py @@ -0,0 +1,17 @@ +import os + +from .base import * # noqa + +# Load secret key from environment +try: + SECRET_KEY = os.environ["TAKAHE_SECRET_KEY"] +except KeyError: + print("You must specify the TAKAHE_SECRET_KEY environment variable!") + os._exit(1) + +# Ensure debug features are off +DEBUG = False +CRISPY_FAIL_SILENTLY = True + +# TODO: Allow better setting of allowed_hosts, if we need to +ALLOWED_HOSTS = ["*"] -- cgit v1.2.3