Skip to content

Commit 4d91e3c

Browse files
glasntparthea
andauthored
clean up django region tags (GoogleCloudPlatform#6495)
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent f6b3732 commit 4d91e3c

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

appengine/flexible/django_cloudsql/mysite/settings.py

+2
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@
164164

165165
# Static files (CSS, JavaScript, Images)
166166
# [START staticurl]
167+
# [START gaeflex_py_django_static_config]
167168
# [START gaeflex_py_django_staticconfig]
168169
# Define static storage via django-storages[google]
169170
GS_BUCKET_NAME = env("GS_BUCKET_NAME")
@@ -172,6 +173,7 @@
172173
STATICFILES_STORAGE = "storages.backends.gcloud.GoogleCloudStorage"
173174
GS_DEFAULT_ACL = "publicRead"
174175
# [END gaeflex_py_django_staticconfig]
176+
# [END gaeflex_py_django_static_config]
175177
# [END staticurl]
176178

177179
# Default primary key field type

kubernetes_engine/django_tutorial/mysite/settings.py

+2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,10 @@
109109
# Static files (CSS, JavaScript, Images)
110110

111111
# [START gke_django_staticconfig]
112+
# [START gke_django_static_config]
112113
STATIC_URL = '/static/'
113114
# STATIC_URL = 'https://storage.googleapis.com/[YOUR_GCS_BUCKET]/static/'
115+
# [END gke_django_static_config]
114116
# [END gke_django_staticconfig]
115117

116118
STATIC_ROOT = 'static/'

run/django/mysite/settings.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
2323

24-
# [START cloudrun_django_secretconfig]
2524
# [START cloudrun_django_secret_config]
2625
env = environ.Env(DEBUG=(bool, False))
2726
env_file = os.path.join(BASE_DIR, ".env")
@@ -60,7 +59,6 @@
6059
else:
6160
raise Exception("No local .env or GOOGLE_CLOUD_PROJECT detected. No secrets found.")
6261
# [END cloudrun_django_secret_config]
63-
# [END cloudrun_django_secretconfig]
6462
SECRET_KEY = env("SECRET_KEY")
6563

6664
# SECURITY WARNING: don't run with debug turned on in production!
@@ -116,7 +114,6 @@
116114
WSGI_APPLICATION = "mysite.wsgi.application"
117115

118116
# Database
119-
# [START cloudrun_django_dbconfig]
120117
# [START cloudrun_django_database_config]
121118
# Use django-environ to parse the connection string
122119
DATABASES = {"default": env.db()}
@@ -127,7 +124,6 @@
127124
DATABASES["default"]["PORT"] = 5432
128125

129126
# [END cloudrun_django_database_config]
130-
# [END cloudrun_django_dbconfig]
131127

132128
# Password validation
133129

@@ -160,13 +156,15 @@
160156
USE_TZ = True
161157

162158
# Static files (CSS, JavaScript, Images)
159+
# [START cloudrun_django_static_config]
163160
# [START cloudrun_django_staticconfig]
164161
# Define static storage via django-storages[google]
165162
GS_BUCKET_NAME = env("GS_BUCKET_NAME")
166163
STATIC_URL = "/static/"
167164
DEFAULT_FILE_STORAGE = "storages.backends.gcloud.GoogleCloudStorage"
168165
STATICFILES_STORAGE = "storages.backends.gcloud.GoogleCloudStorage"
169166
GS_DEFAULT_ACL = "publicRead"
167+
# [END cloudrun_django_static_config]
170168
# [END cloudrun_django_staticconfig]
171169

172170
# Default primary key field type

0 commit comments

Comments
 (0)