Add: Get Allowed hosts and debug from env
This commit is contained in:
parent
0e4cb1092c
commit
7a7111674c
1 changed files with 6 additions and 2 deletions
|
@ -24,9 +24,12 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
SECRET_KEY = "django-insecure-%ym(_f4tmylz_@$5ty#w4k#m2^2nkp!2h8at@wx@rmc&mf8&q7"
|
SECRET_KEY = "django-insecure-%ym(_f4tmylz_@$5ty#w4k#m2^2nkp!2h8at@wx@rmc&mf8&q7"
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = os.environ.get("DEBUG", False)
|
||||||
|
|
||||||
ALLOWED_HOSTS = ["localhost", "127.0.0.1", "northpaw.aroy.hs.tun"]
|
ALLOWED_HOSTS = [
|
||||||
|
"localhost",
|
||||||
|
"127.0.0.1",
|
||||||
|
] + [host.strip() for host in os.environ.get("ALLOWED_HOSTS", "").split(",")]
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
|
@ -53,6 +56,7 @@ INSTALLED_APPS = [
|
||||||
"api.user",
|
"api.user",
|
||||||
"api.posts",
|
"api.posts",
|
||||||
"api.creators",
|
"api.creators",
|
||||||
|
"api.categories",
|
||||||
# Apps for Backend logic
|
# Apps for Backend logic
|
||||||
"apps",
|
"apps",
|
||||||
"apps.archive",
|
"apps.archive",
|
||||||
|
|
Loading…
Add table
Reference in a new issue