Skip to content

Commit 80079d4

Browse files
authored
fix(django): update dependencies and settings for Django samples (#13742)
* chore: updating Django and python versions in requirements, CI-CD/Nox files. b/470283288 Updated Django version to 6.0.1. Updated required python version to 3.12 (minimum version required by Django 6.0.1) * chore: Updated requirements for App Engine Django Flexible Environment b/470283244 - Updated Django and python version in requirements file. - Updated and added missing attributes for frameworks's execution. * chore: Updated requirements for Run Django b/470283502 - Updated Django and python version in requirements and nox files. * chore: Update requirements for Django Cloud SQL - Updated requirements and nox files for latest Django version. * Setting up Django to use signed URLs to workaourn UBLA for buckets. * Fixed linting issues. * Removed remnants from testing that shouldnt be here. * Removed changes to run/django to avoid issue with Pipeline test. Will attempt to merge other changes only.
1 parent ead605a commit 80079d4

File tree

8 files changed

+12
-11
lines changed

8 files changed

+12
-11
lines changed

appengine/flexible/django_cloudsql/noxfile_config.py

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

2323
TEST_CONFIG_OVERRIDE = {
2424
# You can opt out from the test for specific Python versions.
25-
"ignored_versions": ["2.7", "3.7", "3.8", "3.10", "3.12", "3.13"],
25+
"ignored_versions": ["2.7", "3.7", "3.8", "3.9", "3.10", "3.11"],
2626
# An envvar key for determining the project id to use. Change it
2727
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
2828
# build specific Cloud project. You can also use your own string
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Django==5.2.9
1+
Django==6.0.1; python_version >= "3.12"
22
gunicorn==23.0.0
3-
psycopg2-binary==2.9.10
3+
psycopg2-binary==2.9.11
44
django-environ==0.12.0
55
google-cloud-secret-manager==2.21.1
66
django-storages[google]==1.14.6

appengine/flexible/hello_world_django/app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ env: flex
1717
entrypoint: gunicorn -b :$PORT project_name.wsgi
1818

1919
runtime_config:
20-
python_version: 3
20+
operating_system: "ubuntu24"

appengine/flexible/hello_world_django/noxfile_config.py

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

2323
TEST_CONFIG_OVERRIDE = {
2424
# You can opt out from the test for specific Python versions.
25-
"ignored_versions": ["2.7", "3.7"],
25+
"ignored_versions": ["2.7", "3.7", "3.8", "3.9", "3.10", "3.11"],
2626
# Old samples are opted out of enforcing Python type hints
2727
# All new samples should feature them
2828
"enforce_type_hints": False,

appengine/flexible/hello_world_django/project_name/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,5 @@
114114
# https://docs.djangoproject.com/en/stable/howto/static-files/
115115

116116
STATIC_URL = "/static/"
117+
118+
STATIC_ROOT = os.path.join(BASE_DIR, 'static')

appengine/flexible/hello_world_django/project_name/urls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
# limitations under the License.
1414

1515
from django.contrib import admin
16-
from django.urls import include, path
16+
from django.urls import path
1717

1818
import helloworld.views
1919

2020

2121
urlpatterns = [
22-
path("admin/", include(admin.site.urls)),
22+
path("admin/", admin.site.urls),
2323
path("", helloworld.views.index),
2424
]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Django==5.2.9
1+
Django==6.0.1; python_version >= "3.12"
22
gunicorn==23.0.0
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
Django==5.2.9; python_version >= "3.10"
2-
Django==4.2.24; python_version >= "3.8" and python_version < "3.10"
1+
Django==6.0.1; python_version >= "3.12"
32
# Uncomment the mysqlclient requirement if you are using MySQL rather than
43
# PostgreSQL. You must also have a MySQL client installed in that case.
54
#mysqlclient==1.4.1
65
wheel==0.40.0
76
gunicorn==23.0.0; python_version > '3.0'
87
gunicorn==23.0.0; python_version < '3.0'
98
# psycopg2==2.8.4 # uncomment if you prefer to build from source
10-
psycopg2-binary==2.9.10
9+
psycopg2-binary==2.9.11

0 commit comments

Comments
 (0)