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 7878# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
7979
8080# [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+
8186DATABASES = {
8287 'default' : {
83- # If you are using Cloud SQL for MySQL rather than PostgreSQL, set
84- # 'ENGINE': 'django.db.backends.mysql' instead of the following.
8588 'ENGINE' : 'django.db.backends.postgresql' ,
8689 'NAME' : 'polls' ,
8790 'USER' : '<your-database-user>' ,
8891 '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.
9192 'PORT' : '5432' ,
9293 }
9394}
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+
94109# In the flexible environment, you connect to CloudSQL using a unix socket.
95110# Locally, you can use the CloudSQL proxy to proxy a localhost connection
96111# to the instance
Original file line number Diff line number Diff line change 11Django == 2.1.9
2- mysqlclient == 1.4.1
2+ # mysqlclient==1.4.1 # Uncomment this line if using MySQL
33wheel == 0.32.3
44gunicorn == 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