File tree Expand file tree Collapse file tree 2 files changed +21
-6
lines changed
appengine/flexible/django_cloudsql Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change 78
78
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
79
79
80
80
# [START dbconfig]
81
+
82
+ # The following DATABASES configuration is for PostgreSQL. If you are using
83
+ # MySQL, use the commented-out block that follows this one instead. In this
84
+ # case, please also follow the commented instructions in requirements.txt.
85
+
81
86
DATABASES = {
82
87
'default' : {
83
- # If you are using Cloud SQL for MySQL rather than PostgreSQL, set
84
- # 'ENGINE': 'django.db.backends.mysql' instead of the following.
85
88
'ENGINE' : 'django.db.backends.postgresql' ,
86
89
'NAME' : 'polls' ,
87
90
'USER' : '<your-database-user>' ,
88
91
'PASSWORD' : '<your-database-password>' ,
89
- # For MySQL, set 'PORT': '3306' instead of the following. Any Cloud
90
- # SQL Proxy instances running locally must also be set to tcp:3306.
91
92
'PORT' : '5432' ,
92
93
}
93
94
}
95
+
96
+ # Uncomment this DATABASES block and use it instead of the above if you are
97
+ # using MySQL. Also follow the commented instructions in requirements.txt.
98
+
99
+ # DATABASES = {
100
+ # 'default': {
101
+ # 'ENGINE': 'django.db.backends.mysql',
102
+ # 'NAME': 'polls',
103
+ # 'USER': '<your-database-user>',
104
+ # 'PASSWORD': '<your-database-password>',
105
+ # 'PORT': '3306',
106
+ # }
107
+ # }
108
+
94
109
# In the flexible environment, you connect to CloudSQL using a unix socket.
95
110
# Locally, you can use the CloudSQL proxy to proxy a localhost connection
96
111
# to the instance
Original file line number Diff line number Diff line change 1
1
Django == 2.1.9
2
- mysqlclient == 1.4.1
2
+ # mysqlclient==1.4.1 # Uncomment this line if using MySQL
3
3
wheel == 0.32.3
4
4
gunicorn == 19.9.0
5
- psycopg2 == 2.7.7
5
+ psycopg2 == 2.7.7 # Comment this line out if using MySQL
You can’t perform that action at this time.
0 commit comments