Remove example keys and replace with environ access
This commit is contained in:
parent
10386b1ce9
commit
318571bb7e
2 changed files with 11 additions and 17 deletions
|
|
@ -17,19 +17,19 @@ environ.Env.read_env(os.path.join(BASE_DIR, '.env'))
|
|||
|
||||
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = "django-insecure-0peo@#x9jur3!h$ryje!$879xww8y1y66jx!%*#ymhg&jkozs2"
|
||||
SECRET_KEY = env('SECRET_KEY')
|
||||
|
||||
# Resend API Key
|
||||
RESEND_API_KEY = "re_BBXJWctP_8gb4iNpfaHuau7Na95mc3feu"
|
||||
RESEND_API_KEY = env('RESEND_API_KEY')
|
||||
|
||||
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = env('DEBUG')
|
||||
|
||||
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
|
||||
ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1", "pkmntrade-club.fly.dev", "pkmntrade.club"]
|
||||
ALLOWED_HOSTS = env('ALLOWED_HOSTS').split(',')
|
||||
|
||||
CSRF_TRUSTED_ORIGINS = ["https://pkmntrade-club.fly.dev", "https://pkmntrade.club"]
|
||||
CSRF_TRUSTED_ORIGINS = env('CSRF_TRUSTED_ORIGINS').split(',')
|
||||
# Application definition
|
||||
# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
|
||||
INSTALLED_APPS = [
|
||||
|
|
@ -47,11 +47,11 @@ INSTALLED_APPS = [
|
|||
'allauth.socialaccount.providers.google',
|
||||
"crispy_forms",
|
||||
"crispy_tailwind",
|
||||
#"debug_toolbar",
|
||||
"debug_toolbar",
|
||||
"el_pagination",
|
||||
"tailwind",
|
||||
"theme",
|
||||
#"django_browser_reload",
|
||||
"django_browser_reload",
|
||||
"common",
|
||||
"accounts",
|
||||
"cards",
|
||||
|
|
@ -60,12 +60,6 @@ INSTALLED_APPS = [
|
|||
"meta",
|
||||
]
|
||||
|
||||
SILKY_PYTHON_PROFILER = True
|
||||
SILKY_AUTHENTICATION = True
|
||||
SILKY_AUTHORISATION = True
|
||||
SILKY_PERMISSIONS = lambda user: user.is_superuser
|
||||
SILKY_META = True
|
||||
|
||||
TAILWIND_APP_NAME = 'theme'
|
||||
|
||||
META_SITE_NAME = 'PKMN Trade Club'
|
||||
|
|
@ -79,15 +73,13 @@ MIDDLEWARE = [
|
|||
"whitenoise.middleware.WhiteNoiseMiddleware", # WhiteNoise
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
"django.middleware.common.CommonMiddleware",
|
||||
#"debug_toolbar.middleware.DebugToolbarMiddleware", # Django Debug Toolbar
|
||||
"debug_toolbar.middleware.DebugToolbarMiddleware", # Django Debug Toolbar
|
||||
"django.middleware.csrf.CsrfViewMiddleware",
|
||||
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
||||
"django.contrib.messages.middleware.MessageMiddleware",
|
||||
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
||||
"allauth.account.middleware.AccountMiddleware", # django-allauth
|
||||
#'silk.middleware.SilkyMiddleware',
|
||||
#"django_browser_reload.middleware.BrowserReloadMiddleware",
|
||||
#"django_project.middleware.AutoLoginMiddleware",
|
||||
"django_browser_reload.middleware.BrowserReloadMiddleware",
|
||||
]
|
||||
|
||||
DAISY_SETTINGS = {
|
||||
|
|
@ -212,6 +204,8 @@ DEFAULT_FROM_EMAIL = "noreply@pkmntrade.club"
|
|||
INTERNAL_IPS = [
|
||||
"127.0.0.1",
|
||||
]
|
||||
|
||||
#for docker development
|
||||
import socket
|
||||
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
|
||||
INTERNAL_IPS.append([ip[:-1] + "1" for ip in ips])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue