Commit a1bf7429 authored by Bryan Carlo Guanlao's avatar Bryan Carlo Guanlao

configured project's settings to store secret key in a .env file

parent 7b981e54
SECRET_KEY = 'django-insecure-$y$z*4bad7nc46_+$udo32cis1&=e&%7#*_$47+ym=d#u3t46m'
\ No newline at end of file
...@@ -10,7 +10,11 @@ For the full list of settings and their values, see ...@@ -10,7 +10,11 @@ For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/ https://docs.djangoproject.com/en/4.0/ref/settings/
""" """
import os
from pathlib import Path from pathlib import Path
from dotenv import load_dotenv
load_dotenv()
# Build paths inside the project like this: BASE_DIR / 'subdir'. # Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent BASE_DIR = Path(__file__).resolve().parent.parent
...@@ -20,7 +24,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent ...@@ -20,7 +24,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ # See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret! # SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-$y$z*4bad7nc46_+$udo32cis1&=e&%7#*_$47+ym=d#u3t46m' SECRET_KEY = os.getenv('SECRET_KEY')
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment