DB_CONFIG_PATHand should contain the relative path to the configuration file
DB_CONFIG_PATHwill take precedance if defined and will default to
config/database.pyif not defined.
DATABASESvariable with a dictionary of connection details. Each key will be the name of our connection. The connection name can be whatever you like and does not need to relate to a database name. Common connection names could be something like
staging. Feel free to name these connections whatever you like.
ConnectionResolverclass and and register the connection details. Normal convention is to set this to a variable called
db_urlhelper and use it to define the connection
DATABASE_URLenvironment variable by default. If you want to use an other environment variable you just have to do:
config/database.pyfile through the
config/database.pyfile you can put on the bottom here. The StreamHandler will output the queries to the terminal.
DByou can import it like: