Skip to content

Commit 3c945ac

Browse files
ryanmatsJon Wayne Parrott
authored and
Jon Wayne Parrott
committed
Django flex sample: mysql -> postgres (#896)
* Changed Django Flex sample to use postgres * small formatting change * Added note about MySQL
1 parent 705a386 commit 3c945ac

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

appengine/flexible/django_cloudsql/app.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ beta_settings:
99
runtime_config:
1010
python_version: 3
1111
# [END runtime]
12-

appengine/flexible/django_cloudsql/mysite/settings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@
8181
# [START dbconfig]
8282
DATABASES = {
8383
'default': {
84-
'ENGINE': 'django.db.backends.mysql',
84+
# If you are using Cloud SQL for MySQL rather than PostgreSQL, set
85+
# 'ENGINE': 'django.db.backends.mysql' instead of the following.
86+
'ENGINE': 'django.db.backends.postgresql',
8587
'NAME': 'polls',
8688
'USER': '<your-database-user>',
8789
'PASSWORD': '<your-database-password>',

appengine/flexible/django_cloudsql/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ Django==1.11
22
mysqlclient==1.3.10
33
wheel==0.29.0
44
gunicorn==19.7.1
5+
psycopg2==2.7.1

0 commit comments

Comments
 (0)