costapy.ditaajipratama.net/pages/configuration/database.md
Dita Aji Pratama 0e5052676b First commit
2023-08-13 21:55:18 +07:00

735 B

Database (config/database.py)

This is the sample template for configure it

db_default = {
    'host'          : 'localhost',
    'user'          : 'root',
    'password'      : '',
    'database'      : 'your_db',
    'autocommit'    : True,
}

You also can make more than 1 database configuration like this

db_default = {
    'host'          : 'localhost',
    'user'          : 'root',
    'password'      : '',
    'database'      : 'your_db',
    'autocommit'    : True,
}

db_other = {
    'host'          : 'localhost',
    'user'          : 'root',
    'password'      : '',
    'database'      : 'other_db',
    'autocommit'    : True,
}