-
Notifications
You must be signed in to change notification settings - Fork 6.5k
feat: Prevent overriding the value from config #7218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Prevent overriding the value from config #7218
Conversation
Previously the DEBUG env var will always be overridden into True, while we already have a way to read it from env var. By setting the default value as True and not overridding the value later we can retainthe DEBUG value provided from the users.
0bc7bed
to
3feb3c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one minor comment.
run/django/mysite/settings.py
Outdated
# SECURITY WARNING: don't run with debug turned on in production! | ||
# Change this to "False" when you are ready for production |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move this warning up above to where it's set to True
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed your comment @dandhlee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Description
Fixes #Previously the DEBUG env var will always be overridden into True, while
we already have a way to read it from env var. By setting the default
value as True and not overridding the value later we can retainthe DEBUG
value provided from the users.
Note: It's a good idea to open an issue first for discussion.
Checklist
nox -s py-3.6
(see Test Environment Setup)nox -s lint
(see Test Environment Setup)