mirror of
https://github.com/lemeow125/Django-NotesApp.git
synced 2025-05-16 11:38:11 +08:00
Moved secret key to .env file
This commit is contained in:
parent
6f61914e22
commit
3f96b4e7db
3 changed files with 95 additions and 95 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue