Files
Reskreen/config/server_config_default.py
2026-01-14 12:55:19 +01:00

65 lines
1.6 KiB
Python

from pathlib import Path
import os
BASE_DIR = Path(__file__).resolve().parent.parent
cfg_dev_mode = False
SECRET_KEY = 'django-insecure'
cfg_status_badge = "https://status.resk-u.ch/api/badge/22/uptime/744"
ALLOWED_HOSTS = ["reskreen-back.prod.resk-u.ch"]
ALLOWED_HOSTS.append("rh.ambulance-clerc.ch")
ALLOWED_HOSTS.append("reskreen-back.ambulance-clerc.ch")
ALLOWED_HOSTS.append("localhost")
CSRF_TRUSTED_ORIGINS = ['https://reskreen-back.prod.resk-u.ch']
CSRF_TRUSTED_ORIGINS.append("https://reskreen-back.ambulance-clerc.ch")
CORS_ALLOWED_ORIGINS = [
"https://reskreen-val.prod.resk-u.ch",
"https://reskreen.ambulance-clerc.ch",
"http://33.144.144.13:4173",
"http://33.144.144.13:5173",
"http://33.144.144.13:3000",
"http://100.126.38.72:5173",
]
if cfg_dev_mode:
NEXTCLOUD_HOST = "cloud.ambulance-clerc.ch"
else:
NEXTCLOUD_HOST = "cloud.ambulance-clerc.ch"
NEXTCLOUD_USER_DEFAULT_PASSWORD = "Mc144*1870"
if cfg_dev_mode:
'''DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
'''
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'OPTIONS': {
'read_default_file': os.path.join(BASE_DIR, 'config/my_dev.cnf'),
},
}
}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'OPTIONS': {
'read_default_file': os.path.join(BASE_DIR, 'config/my.cnf'),
},
}
}