Skip to content

Commit 471f681

Browse files
authored
fix: correct deprecated Django functionality, update Django deps (GoogleCloudPlatform#11004)
* fix: correct deprecated Django functionality, update Django deps * lint: isort * lint: flake8 * lint: flake8 (with --import-order-style=google)
1 parent 3d344f1 commit 471f681

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

appengine/standard_python3/bundled-services/mail/django/main.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@
1515
import os
1616

1717
from django.conf import settings
18-
from django.conf.urls import url
1918
from django.core.wsgi import get_wsgi_application
2019
from django.http import HttpResponse
21-
from google.appengine.api import mail
22-
from google.appengine.api import wrap_wsgi_app
20+
from django.urls import re_path
21+
from google.appengine.api import mail, wrap_wsgi_app
2322

2423

2524
def home_page(request):
@@ -106,9 +105,9 @@ def receive_bounce(request):
106105

107106

108107
urlpatterns = [
109-
url(r"^$", home_page),
110-
url(r"^_ah/mail/.*$", receive_mail),
111-
url(r"^_ah/bounce$", receive_bounce),
108+
re_path(r"^$", home_page),
109+
re_path(r"^_ah/mail/.*$", receive_mail),
110+
re_path(r"^_ah/bounce$", receive_bounce),
112111
]
113112

114113
settings.configure(
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
Django==3.2.23
1+
Django==5.0; python_version >= "3.10"
2+
Django==4.2.8; python_version >= "3.8" and python_version < "3.10"
3+
Django==3.2.23; python_version < "3.8"
24
django-environ==0.10.0
35
google-cloud-logging==3.5.0
46
appengine-python-standard>=0.2.3

0 commit comments

Comments
 (0)