How can I use a PostgreSQL database on a Pyramid application? I'm using OpenShift as my "PaaS".
I added the PostgreSQL cartridge and it gave me a sql connection url that looked like this:
postgresql://$OPENSHIFT_POSTGRESQL_DB_HOST:$OPENSHIFT_POSTGRESQL_DB_PORT
But I don't know how and where to use it.
I solved it myself, by adding/replacing this to my "_ _init__.py" and "initializedb.py"
import os
engine = create_engine(os.environ.get('OPENSHIFT_POSTGRESQL_DB_URL'))