Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_huli
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Izaac Daniel B. Muncal
midterm_huli
Commits
ed5b0962
Commit
ed5b0962
authored
Mar 05, 2023
by
Brescia Amandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set the SECRET_KEY via environment variables
parent
7a3991e8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
.env
widget_huli/widget_huli/.env
+1
-0
settings.py
widget_huli/widget_huli/settings.py
+4
-1
No files found.
widget_huli/widget_huli/.env
0 → 100644
View file @
ed5b0962
SECRET_KEY = 'django-insecure-gteg#r+a3^&nw_f+1)zcy#m72jv-i)wqfktiz$+#*6zem+6h^9'
\ No newline at end of file
widget_huli/widget_huli/settings.py
View file @
ed5b0962
...
@@ -11,6 +11,9 @@ https://docs.djangoproject.com/en/4.1/ref/settings/
...
@@ -11,6 +11,9 @@ https://docs.djangoproject.com/en/4.1/ref/settings/
"""
"""
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 +23,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
...
@@ -20,7 +23,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
# See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/
# See https://docs.djangoproject.com/en/4.1/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-gteg#r+a3^&nw_f+1)zcy#m72jv-i)wqfktiz$+#*6zem+6h^9'
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