Skip to content

Commit 776d1f3

Browse files
committed
Merge branch 'main' of github.com:GoogleCloudPlatform/python-docs-samples into testing-isolation
2 parents 0934aa0 + de4ad98 commit 776d1f3

File tree

178 files changed

+3170
-1793
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+3170
-1793
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
/privateca/**/* @GoogleCloudPlatform/dee-infra @GoogleCloudPlatform/python-samples-reviewers @GoogleCloudPlatform/cloud-samples-reviewers
3636
/recaptcha_enterprise/**/* @GoogleCloudPlatform/dee-infra @GoogleCloudPlatform/python-samples-reviewers @GoogleCloudPlatform/cloud-samples-reviewers
3737
/recaptcha_enterprise/demosite/**/* @GoogleCloudPlatform/dee-infra @GoogleCloudPlatform/recaptcha-customer-obsession-reviewers @GoogleCloudPlatform/python-samples-reviewers @GoogleCloudPlatform/cloud-samples-reviewers
38-
/secretmanager/**/* @GoogleCloudPlatform/dee-infra @GoogleCloudPlatform/python-samples-reviewers @GoogleCloudPlatform/cloud-samples-reviewers
38+
/secretmanager/**/* @GoogleCloudPlatform/dee-infra @GoogleCloudPlatform/python-samples-reviewers @GoogleCloudPlatform/cloud-samples-reviewers @GoogleCloudPlatform/cloud-secrets-team
3939
/securitycenter/**/* @GoogleCloudPlatform/dee-infra @GoogleCloudPlatform/python-samples-reviewers @GoogleCloudPlatform/cloud-samples-reviewers @GoogleCloudPlatform/gcp-security-command-center
4040
/service_extensions/**/* @GoogleCloudPlatform/service-extensions-samples-reviewers @GoogleCloudPlatform/dee-infra @GoogleCloudPlatform/python-samples-reviewers @GoogleCloudPlatform/cloud-samples-reviewers
4141
/vmwareengine/**/* @GoogleCloudPlatform/dee-infra @GoogleCloudPlatform/python-samples-reviewers @GoogleCloudPlatform/cloud-samples-reviewers

appengine/flexible/django_cloudsql/mysite/settings.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@
158158

159159
USE_I18N = True
160160

161-
USE_L10N = True
162161

163162
USE_TZ = True
164163

@@ -168,8 +167,14 @@
168167
# Define static storage via django-storages[google]
169168
GS_BUCKET_NAME = env("GS_BUCKET_NAME")
170169
STATIC_URL = "/static/"
171-
DEFAULT_FILE_STORAGE = "storages.backends.gcloud.GoogleCloudStorage"
172-
STATICFILES_STORAGE = "storages.backends.gcloud.GoogleCloudStorage"
170+
STORAGES = {
171+
"default": {
172+
"BACKEND": "storages.backends.gcloud.GoogleCloudStorage",
173+
},
174+
"staticfiles": {
175+
"BACKEND": "storages.backends.gcloud.GoogleCloudStorage",
176+
},
177+
}
173178
GS_DEFAULT_ACL = "publicRead"
174179
# [END gaeflex_py_django_static_config]
175180
# [END staticurl]

appengine/flexible/django_cloudsql/polls/urls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from django.urls import re_path
15+
from django.urls import path
1616

1717
from . import views
1818

1919
urlpatterns = [
20-
re_path(r"^$", views.index, name="index"),
20+
path("", views.index, name="index"),
2121
]

appengine/flexible/django_cloudsql/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Django==5.0.4; python_version >= "3.10"
2-
Django==4.2.13; python_version < "3.10"
1+
Django==5.1; python_version >= "3.10"
2+
Django==4.2.15; python_version >= "3.8" and python_version < "3.10"
33
gunicorn==22.0.0
44
psycopg2-binary==2.9.9
55
django-environ==0.11.2

appengine/flexible/hello_world_django/project_name/urls.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,13 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
"""project_name URL Configuration
16-
17-
The `urlpatterns` list routes URLs to views. For more information please see:
18-
https://docs.djangoproject.com/en/stable/topics/http/urls/
19-
Examples:
20-
Function views
21-
1. Add an import: from my_app import views
22-
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
23-
Class-based views
24-
1. Add an import: from other_app.views import Home
25-
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
26-
Including another URLconf
27-
1. Add an import: from blog import urls as blog_urls
28-
2. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls))
29-
"""
30-
from django.conf.urls import include, url
3115
from django.contrib import admin
16+
from django.urls import include, path
3217

3318
import helloworld.views
3419

3520

3621
urlpatterns = [
37-
url(r"^admin/", include(admin.site.urls)),
38-
url(r"^$", helloworld.views.index),
22+
path("admin/", include(admin.site.urls)),
23+
path("", helloworld.views.index),
3924
]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Django==5.0.4; python_version >= "3.10"
2-
Django==4.2.13; python_version >= "3.8" and python_version < "3.10"
1+
Django==5.1; python_version >= "3.10"
2+
Django==4.2.15; python_version >= "3.8" and python_version < "3.10"
33
Django==3.2.25; python_version < "3.8"
44
gunicorn==22.0.0

appengine/flexible_python37_and_earlier/django_cloudsql/polls/urls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from django.urls import re_path
15+
from django.urls import path
1616

1717
from . import views
1818

1919
urlpatterns = [
20-
re_path(r"^$", views.index, name="index"),
20+
path("", views.index, name="index"),
2121
]

appengine/flexible_python37_and_earlier/django_cloudsql/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Django==5.0.4; python_version >= "3.10"
2-
Django==4.2.13; python_version >= "3.8" and python_version < "3.10"
1+
Django==5.1; python_version >= "3.10"
2+
Django==4.2.15; python_version >= "3.8" and python_version < "3.10"
33
Django==3.2.25; python_version < "3.8"
44
gunicorn==22.0.0
55
psycopg2-binary==2.9.9

appengine/flexible_python37_and_earlier/hello_world_django/project_name/urls.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,13 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
"""project_name URL Configuration
16-
17-
The `urlpatterns` list routes URLs to views. For more information please see:
18-
https://docs.djangoproject.com/en/stable/topics/http/urls/
19-
Examples:
20-
Function views
21-
1. Add an import: from my_app import views
22-
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
23-
Class-based views
24-
1. Add an import: from other_app.views import Home
25-
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
26-
Including another URLconf
27-
1. Add an import: from blog import urls as blog_urls
28-
2. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls))
29-
"""
30-
from django.conf.urls import include, url
3115
from django.contrib import admin
16+
from django.urls import include, path
3217

3318
import helloworld.views
3419

3520

3621
urlpatterns = [
37-
url(r"^admin/", include(admin.site.urls)),
38-
url(r"^$", helloworld.views.index),
22+
path("admin/", include(admin.site.urls)),
23+
path("", helloworld.views.index),
3924
]
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Django==5.0.4; python_version >= "3.10"
2-
Django==5.0.3; python_version >= "3.10"
3-
Django==4.2.13; python_version >= "3.8" and python_version < "3.10"
1+
Django==5.1; python_version >= "3.10"
2+
Django==4.2.15; python_version >= "3.8" and python_version < "3.10"
43
Django==3.2.25; python_version < "3.8"
54
gunicorn==22.0.0

0 commit comments

Comments
 (0)