Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_Francoconuts
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Chester Tan
widget_Francoconuts
Commits
a1bf7429
Commit
a1bf7429
authored
Mar 08, 2022
by
Bryan Carlo Guanlao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configured project's settings to store secret key in a .env file
parent
7b981e54
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
.env
widget_Francoconuts/widget_Francoconuts/.env
+1
-0
settings.py
widget_Francoconuts/widget_Francoconuts/settings.py
+5
-1
No files found.
widget_Francoconuts/widget_Francoconuts/.env
0 → 100644
View file @
a1bf7429
SECRET_KEY = 'django-insecure-$y$z*4bad7nc46_+$udo32cis1&=e&%7#*_$47+ym=d#u3t46m'
\ No newline at end of file
widget_Francoconuts/widget_Francoconuts/settings.py
View file @
a1bf7429
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment