db_config.py 296 B

1234567891011
  1. from app import app
  2. from flaskext.mysql import MySQL
  3. mysql = MySQL()
  4. # MySQL configurations
  5. app.config['MYSQL_DATABASE_USER'] = 'root'
  6. app.config['MYSQL_DATABASE_PASSWORD'] = 'root'
  7. app.config['MYSQL_DATABASE_DB'] = 'roytuts'
  8. app.config['MYSQL_DATABASE_HOST'] = 'localhost'
  9. mysql.init_app(app)