Hi,
AFAIK PostgreSQL is not available under AppEngine standard if you're using
Python 2.7 since the driver is not / can not be installed (Psycopg2). If
you're using AppEngine standard "second generation" runtime with Python 3
you should be able to get it working by making sure the right packages are
specified in the requirements.txt and Django is configured to connect using
Unix Domain Sockets rather than TCP. So your Django settings should contain
something like:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # note the
_psycopg2 postfix
'HOST': os.environ['DB_HOST'], # this should be set to something
like "/cloudsql/..."
# 'PORT': os.environ['DB_PORT'], - this is NOT needed
'NAME': os.environ['DB_NAME'],
'USER': os.environ['DB_USER'],
'PASSWORD': os.environ['DB_PASSWORD'] or ''
}
}
ie. you should try connecting to it using unix domain sockets rather than
TCP. This seems to be also some relevant discussion:
https://github.com/GoogleCloudPlatform/python-docs-samples/issues/870
Good luck!
Attila
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/b4c45dd2-15fe-4d2a-b224-132cfe8a0e76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.