Moved secret key to .env file

This commit is contained in:
Keannu Christian Bernasol 2023-03-15 23:12:01 +08:00
parent 6f61914e22
commit 3f96b4e7db
3 changed files with 95 additions and 95 deletions

View file

@ -11,6 +11,10 @@ https://docs.djangoproject.com/en/4.1/ref/settings/
"""
from pathlib import Path
from dotenv import load_dotenv
import os
load_dotenv()
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
@ -20,8 +24,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
# See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-=p&04v6!#hvz*g1ht4c7tjcsy6*e61u7tkv8ird9b*#%lo$kjx'
SECRET_KEY = os.environ.get('SECRET_KEY')
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True