Skip to content

Commit

Permalink
Merge branch 'master' into renovate/google-cloud-bigquery-2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
leahecole authored Jul 30, 2021
2 parents 6a33eb1 + 375a505 commit 7ad6436
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions appengine/flexible/django_cloudsql/mysite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@

# Static files (CSS, JavaScript, Images)
# [START staticurl]
# [START gaeflex_py_django_static_config]
# [START gaeflex_py_django_staticconfig]
# Define static storage via django-storages[google]
GS_BUCKET_NAME = env("GS_BUCKET_NAME")
Expand All @@ -172,6 +173,7 @@
STATICFILES_STORAGE = "storages.backends.gcloud.GoogleCloudStorage"
GS_DEFAULT_ACL = "publicRead"
# [END gaeflex_py_django_staticconfig]
# [END gaeflex_py_django_static_config]
# [END staticurl]

# Default primary key field type
Expand Down
2 changes: 2 additions & 0 deletions auth/service-to-service/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

# [START google_auth_idtoken_serverless]
# [START functions_bearer_token]
# [START cloudrun_service_to_service_auth]
# [START run_service_to_service_auth]
import urllib

Expand All @@ -42,5 +43,6 @@ def make_authorized_get_request(service_url):

return response.read()
# [END run_service_to_service_auth]
# [END cloudrun_service_to_service_auth]
# [END functions_bearer_token]
# [END google_auth_idtoken_serverless]
2 changes: 1 addition & 1 deletion functions/ocr/app/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
google-cloud-pubsub==2.7.0
google-cloud-storage==1.41.0
google-cloud-translate==3.3.1
google-cloud-translate==3.3.2
google-cloud-vision==2.4.1
2 changes: 2 additions & 0 deletions kubernetes_engine/django_tutorial/mysite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@
# Static files (CSS, JavaScript, Images)

# [START gke_django_staticconfig]
# [START gke_django_static_config]
STATIC_URL = '/static/'
# STATIC_URL = 'https://storage.googleapis.com/[YOUR_GCS_BUCKET]/static/'
# [END gke_django_static_config]
# [END gke_django_staticconfig]

STATIC_ROOT = 'static/'
Expand Down
6 changes: 2 additions & 4 deletions run/django/mysite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

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

# [START cloudrun_django_secretconfig]
# [START cloudrun_django_secret_config]
env = environ.Env(DEBUG=(bool, False))
env_file = os.path.join(BASE_DIR, ".env")
Expand Down Expand Up @@ -60,7 +59,6 @@
else:
raise Exception("No local .env or GOOGLE_CLOUD_PROJECT detected. No secrets found.")
# [END cloudrun_django_secret_config]
# [END cloudrun_django_secretconfig]
SECRET_KEY = env("SECRET_KEY")

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

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

# [END cloudrun_django_database_config]
# [END cloudrun_django_dbconfig]

# Password validation

Expand Down Expand Up @@ -160,13 +156,15 @@
USE_TZ = True

# Static files (CSS, JavaScript, Images)
# [START cloudrun_django_static_config]
# [START cloudrun_django_staticconfig]
# Define static storage via django-storages[google]
GS_BUCKET_NAME = env("GS_BUCKET_NAME")
STATIC_URL = "/static/"
DEFAULT_FILE_STORAGE = "storages.backends.gcloud.GoogleCloudStorage"
STATICFILES_STORAGE = "storages.backends.gcloud.GoogleCloudStorage"
GS_DEFAULT_ACL = "publicRead"
# [END cloudrun_django_static_config]
# [END cloudrun_django_staticconfig]

# Default primary key field type
Expand Down

0 comments on commit 7ad6436

Please sign in to comment.