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

Update settings.py

parent f7cdeccf
No related branches found
No related tags found
2 merge requests!3Merge new master to dev,!2Uc 2
Pipeline #113029 failed
......@@ -43,7 +43,8 @@ ALLOWED_HOSTS = [
"10." + groupid + ".0.4",
"molde.idi.ntnu.no",
"10.0.2.2",
"secfit-group15.herokuapp.com"
"secfit-group15-frontend.herokuapp.com",
"secfit-group15-backend.herokuapp.com"
]
# Application definition
......@@ -96,12 +97,22 @@ WSGI_APPLICATION = "secfit.wsgi.application"
# Database
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
is_prod = os.environ.get("IS_HEROKU", None)
if is_prod:
settings(locals())
if 'DATABASE_URL' in os.environ:
import dj_database_url
print("\n\n\n\n\nHEI\n\n\n\n\n\n")
DATABASES = {'default': dj_database_url.config()}
else:
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
}
}
}
# CORS Policy
CORS_ORIGIN_ALLOW_ALL = (
......
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