network_inventory/src/network_inventory/settings/local.py

37 lines
679 B
Python
Raw Normal View History

2022-03-27 16:13:34 +02:00
from socket import gethostname
from socket import gethostbyname
from socket import getfqdn
2023-07-14 14:15:11 +02:00
import os
2019-07-13 12:37:58 +02:00
from .base import *
2022-03-27 16:13:34 +02:00
2019-07-13 12:37:58 +02:00
ALLOWED_HOSTS = [
2022-03-27 14:50:44 +02:00
"localhost",
"127.0.0.1",
2022-03-27 16:13:34 +02:00
getfqdn(),
gethostname(),
gethostbyname(gethostname()),
2019-07-13 12:37:58 +02:00
]
CSRF_TRUSTED_ORIGINS = [
2022-03-27 14:50:44 +02:00
"http://localhost:8000",
]
2019-07-13 12:37:58 +02:00
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "foo"
2019-07-13 12:37:58 +02:00
DEBUG = True
CRISPY_FAIL_SILENTLY = not DEBUG
2019-07-13 12:37:58 +02:00
DATABASES = {
2022-03-27 14:50:44 +02:00
"default": {
"ENGINE": "django.db.backends.postgresql",
2023-07-14 14:34:56 +02:00
"NAME": "django",
2023-07-14 14:15:11 +02:00
"USER": os.environ.get("USER"),
2023-07-18 21:43:42 +02:00
"HOST": os.environ.get("PGHOST"),
"PORT": os.environ.get("PGPORT"),
2020-08-03 13:41:49 +02:00
}
2019-07-13 12:37:58 +02:00
}