From ab8b798547e82ca79882ba28b1920077c803425f Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Fri, 5 Apr 2019 18:24:32 +0100 Subject: pysite -> pydis_site --- pydis_site/settings.py | 259 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 259 insertions(+) create mode 100644 pydis_site/settings.py (limited to 'pydis_site/settings.py') diff --git a/pydis_site/settings.py b/pydis_site/settings.py new file mode 100644 index 00000000..e8355918 --- /dev/null +++ b/pydis_site/settings.py @@ -0,0 +1,259 @@ +""" +Django settings for pydis_site project. + +Generated by 'django-admin startproject' using Django 2.1. + +For more information on this file, see +https://docs.djangoproject.com/en/2.1/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/2.1/ref/settings/ +""" + +import os +import sys + +import environ + + +env = environ.Env( + DEBUG=(bool, False) +) + + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +DEBUG = env('DEBUG') + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +if DEBUG: + ALLOWED_HOSTS = [ + 'pythondiscord.local', + 'admin.pythondiscord.local', + 'api.pythondiscord.local', + 'staff.pythondiscord.local', + 'wiki.pythondiscord.local' + ] + SECRET_KEY = "+_x00w3e94##2-qm-v(5&-x_@*l3t9zlir1etu+7$@4%!it2##" + +elif 'CI' in os.environ: + ALLOWED_HOSTS = ['*'] + SECRET_KEY = "{©ø¬½.Þ7&Ñ`Q^Kº*~¢j