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
|
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
|
||||||
# SECURITY WARNING: keep the secret key used in production secret!
|
# 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
|
||||||
RESEND_API_KEY = "re_BBXJWctP_8gb4iNpfaHuau7Na95mc3feu"
|
RESEND_API_KEY = env('RESEND_API_KEY')
|
||||||
|
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
|
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = env('DEBUG')
|
DEBUG = env('DEBUG')
|
||||||
|
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
|
# 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
|
# Application definition
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
|
# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
|
|
@ -47,11 +47,11 @@ INSTALLED_APPS = [
|
||||||
'allauth.socialaccount.providers.google',
|
'allauth.socialaccount.providers.google',
|
||||||
"crispy_forms",
|
"crispy_forms",
|
||||||
"crispy_tailwind",
|
"crispy_tailwind",
|
||||||
#"debug_toolbar",
|
"debug_toolbar",
|
||||||
"el_pagination",
|
"el_pagination",
|
||||||
"tailwind",
|
"tailwind",
|
||||||
"theme",
|
"theme",
|
||||||
#"django_browser_reload",
|
"django_browser_reload",
|
||||||
"common",
|
"common",
|
||||||
"accounts",
|
"accounts",
|
||||||
"cards",
|
"cards",
|
||||||
|
|
@ -60,12 +60,6 @@ INSTALLED_APPS = [
|
||||||
"meta",
|
"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'
|
TAILWIND_APP_NAME = 'theme'
|
||||||
|
|
||||||
META_SITE_NAME = 'PKMN Trade Club'
|
META_SITE_NAME = 'PKMN Trade Club'
|
||||||
|
|
@ -79,15 +73,13 @@ MIDDLEWARE = [
|
||||||
"whitenoise.middleware.WhiteNoiseMiddleware", # WhiteNoise
|
"whitenoise.middleware.WhiteNoiseMiddleware", # WhiteNoise
|
||||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||||
"django.middleware.common.CommonMiddleware",
|
"django.middleware.common.CommonMiddleware",
|
||||||
#"debug_toolbar.middleware.DebugToolbarMiddleware", # Django Debug Toolbar
|
"debug_toolbar.middleware.DebugToolbarMiddleware", # Django Debug Toolbar
|
||||||
"django.middleware.csrf.CsrfViewMiddleware",
|
"django.middleware.csrf.CsrfViewMiddleware",
|
||||||
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
||||||
"django.contrib.messages.middleware.MessageMiddleware",
|
"django.contrib.messages.middleware.MessageMiddleware",
|
||||||
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
||||||
"allauth.account.middleware.AccountMiddleware", # django-allauth
|
"allauth.account.middleware.AccountMiddleware", # django-allauth
|
||||||
#'silk.middleware.SilkyMiddleware',
|
"django_browser_reload.middleware.BrowserReloadMiddleware",
|
||||||
#"django_browser_reload.middleware.BrowserReloadMiddleware",
|
|
||||||
#"django_project.middleware.AutoLoginMiddleware",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
DAISY_SETTINGS = {
|
DAISY_SETTINGS = {
|
||||||
|
|
@ -212,6 +204,8 @@ DEFAULT_FROM_EMAIL = "noreply@pkmntrade.club"
|
||||||
INTERNAL_IPS = [
|
INTERNAL_IPS = [
|
||||||
"127.0.0.1",
|
"127.0.0.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
#for docker development
|
||||||
import socket
|
import socket
|
||||||
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
|
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
|
||||||
INTERNAL_IPS.append([ip[:-1] + "1" for ip in ips])
|
INTERNAL_IPS.append([ip[:-1] + "1" for ip in ips])
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<title>[PᴋMɴ Trade Club] {% block title %}{% endblock title %}</title>
|
<title>{% block title %}{% endblock title %} - PᴋMɴ Trade Club</title>
|
||||||
|
|
||||||
<link rel="shortcut icon" href="{% static 'images/favicon.ico' %}">
|
<link rel="shortcut icon" href="{% static 'images/favicon.ico' %}">
|
||||||
<!-- Choices.js -->
|
<!-- Choices.js -->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue