Commit 9d5f213a authored by Ray Rafael Abenido's avatar Ray Rafael Abenido

Added a .env file to hide secret key. Testing shows that the rest of the...

Added a .env file to hide secret key. Testing shows that the rest of the project remains unaffected by this change.
parent 535cddb4
SECRET_KEY='django-insecure-2r)*a*a(_wsywo^ddl_50b$)l+o6e)ph7^bnm4)1oh)wyx=d2j'
\ No newline at end of file
...@@ -11,6 +11,10 @@ https://docs.djangoproject.com/en/3.2/ref/settings/ ...@@ -11,6 +11,10 @@ https://docs.djangoproject.com/en/3.2/ref/settings/
""" """
from pathlib import Path from pathlib import Path
import environ
env = environ.Env()
environ.Env.read_env()
# 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/3.2/howto/deployment/checklist/ # See https://docs.djangoproject.com/en/3.2/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-2r)*a*a(_wsywo^ddl_50b$)l+o6e)ph7^bnm4)1oh)wyx=d2j' SECRET_KEY = env("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