Skip to content
Snippets Groups Projects
Commit 08c03e6b authored by Vegard Murvold Sporstøl's avatar Vegard Murvold Sporstøl
Browse files

Update settings.py

parent 48e3a86e
No related branches found
No related tags found
2 merge requests!3Merge new master to dev,!2Uc 2
Pipeline #112918 failed
......@@ -13,6 +13,12 @@ https://docs.djangoproject.com/en/3.1/ref/settings/
from pathlib import Path
import os
import environ
env = environ.Env(
DEBUG=(bool, False)
)
environ.Env.read_env()
# Get the GROUPID variable to accept connections from the application server and NGINX
groupid = os.environ.get("GROUPID", "0")
......@@ -43,8 +49,6 @@ ALLOWED_HOSTS = [
"10." + groupid + ".0.4",
"molde.idi.ntnu.no",
"10.0.2.2",
"secfit-group15-staging.herokuapp.com",
"secfit-group15-production.herokuapp.com",
"secfit-group15.herokuapp.com"
]
......@@ -100,11 +104,16 @@ WSGI_APPLICATION = "secfit.wsgi.application"
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
"ENGINE": "django.db.backends.postgresql_psycopg2",
"NAME": env("DB_NAME"),
"USER": env("DB_USER"),
"PASSWORD": env("DB_PASSWORD"),
"HOST": env("DB_HOST"),
"PORT": env("DB_PORT", cast=int),
}
}
# CORS Policy
CORS_ORIGIN_ALLOW_ALL = (
True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment