Skip to content

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions run/django/mysite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# [START cloudrun_django_secret_config]
env = environ.Env(DEBUG=(bool, False))
# SECURITY WARNING: don't run with debug turned on in production!
# Change this to "False" when you are ready for production
env = environ.Env(DEBUG=(bool, True))
env_file = os.path.join(BASE_DIR, ".env")

# Attempt to load the Project ID into the environment, safely failing on error.
Expand Down Expand Up @@ -61,9 +63,7 @@
# [END cloudrun_django_secret_config]
SECRET_KEY = env("SECRET_KEY")

# SECURITY WARNING: don't run with debug turned on in production!
# Change this to "False" when you are ready for production
DEBUG = True
DEBUG = env("DEBUG")

# SECURITY WARNING: It's recommended that you change this setting when
# running in production. The URL will be known once you first deploy
Expand Down