Skip to content

Commit c6d84f6

Browse files
authored
fix: use django-environ for django DEBUG settings (GoogleCloudPlatform#6792)
## Description Django examples use `django-environ` but it is not being used for the `DEBUG` settings. ## Checklist - [x] I have followed [Sample Guidelines from AUTHORING_GUIDE.MD](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md) - [x] README is updated to include [all relevant information](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#readme-file) - [x] **Tests** pass: `nox -s py-3.6` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#test-environment-setup)) - [x] **Lint** pass: `nox -s lint` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#test-environment-setup)) - [ ] These samples need a new **API enabled** in testing projects to pass (let us know which ones) - [ ] These samples need a new/updated **env vars** in testing projects set to pass (let us know which ones) - [x] Please **merge** this PR for me once it is approved. - [ ] This sample adds a new sample directory, and I updated the [CODEOWNERS file](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/.github/CODEOWNERS) with the codeowners for this sample
1 parent e3a6ac7 commit c6d84f6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

appengine/flexible/django_cloudsql/mysite/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858

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

6363
# SECURITY WARNING: App Engine's security features ensure that it is safe to
6464
# have ALLOWED_HOSTS = ['*'] when the app is deployed. If you deploy a Django

appengine/standard_python3/django/mysite/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

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

6262
# SECURITY WARNING: App Engine's security features ensure that it is safe to
6363
# have ALLOWED_HOSTS = ['*'] when the app is deployed. If you deploy a Django

0 commit comments

Comments
 (0)