feat: environment file
This commit is contained in:
parent
af7b4125c9
commit
9b818be7c3
3 changed files with 8 additions and 4 deletions
|
@ -11,6 +11,9 @@ https://docs.djangoproject.com/en/5.1/ref/settings/
|
|||
"""
|
||||
import os
|
||||
from pathlib import Path
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
@ -20,7 +23,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||
# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'django-insecure-7o__%v#^c7@y8$rvma%s_z-jma7xj#5y-en@ll(_zmk3u=sob7'
|
||||
SECRET_KEY = os.environ.get('SECRET_KEY')
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = False
|
||||
|
@ -30,7 +33,7 @@ if DEBUG:
|
|||
CSRF_TRUSTED_ORIGINS = ['http://localhost']
|
||||
else:
|
||||
ALLOWED_HOSTS = ['*']
|
||||
CSRF_TRUSTED_ORIGINS = ['http://localhost']
|
||||
CSRF_TRUSTED_ORIGINS = ['http://localhost', 'http://torreta.local', 'https://torreta.gerardgascon.com']
|
||||
|
||||
|
||||
# Application definition
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue