8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e461e9a commit a2f4c7fCopy full SHA for a2f4c7f
appengine/standard_python37/django/mysite/settings.py
@@ -79,6 +79,12 @@
79
# Database
80
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
81
82
+# Install PyMySQL as mysqlclient/MySQLdb to use Django's mysqlclient adapter
83
+# See https://docs.djangoproject.com/en/2.1/ref/databases/#mysql-db-api-drivers for
84
+# more information
85
+import pymysql
86
+pymysql.install_as_MySQLdb()
87
+
88
# [START db_setup]
89
if os.getenv('GAE_APPLICATION', None):
90
# Running on production App Engine, so connect to Google Cloud SQL using
@@ -89,6 +95,7 @@
95
'HOST': '/cloudsql/[YOUR-CONNECTION-NAME]',
96
'USER': '[YOUR-USERNAME]',
91
97
'PASSWORD': '[YOUR-PASSWORD]',
98
+ 'NAME': '[YOUR-DATABASE]',
92
99
}
93
100
94
101
else:
0 commit comments