Configured the settings properly and put the secret key in an env file. Added...

Configured the settings properly and put the secret key in an env file. Added a new folder for the static files to get pointed into.
parent 3fc9b3f5
SECRET_KEY='django-insecure-ev1*oh4k0=r1o1!1_($#)j7@rz2dge53#bw+xn=grhx)qo9#yp'
STATIC_ROOT='/staticfiles'
\ No newline at end of file
...@@ -11,6 +11,11 @@ https://docs.djangoproject.com/en/3.2/ref/settings/ ...@@ -11,6 +11,11 @@ https://docs.djangoproject.com/en/3.2/ref/settings/
""" """
from pathlib import Path from pathlib import Path
from dotenv import load_dotenv
load_dotenv()
import os
# 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 +25,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent ...@@ -20,7 +25,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-ev1*oh4k0=r1o1!1_($#)j7@rz2dge53#bw+xn=grhx)qo9#yp' 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