def init_app(self, app):
        """Initialize the `app` for use with this
        :class:`~flask_mysqldb.MySQL` class.
        This is called automatically if `app` is passed to
        :meth:`~MySQL.__init__`.

        :param flask.Flask app: the application to configure for use with
            this :class:`~flask_mysqldb.MySQL` class.
        """

        app.config.setdefault('MYSQL_HOST', 'localhost')
        app.config.setdefault('MYSQL_USER', None)
        app.config.setdefault('MYSQL_PASSWORD', None)
        app.config.setdefault('MYSQL_DB', None)
        app.config.setdefault('MYSQL_PORT', 3306)
        app.config.setdefault('MYSQL_UNIX_SOCKET', None)
        app.config.setdefault('MYSQL_CONNECT_TIMEOUT', 10)
        app.config.setdefault('MYSQL_READ_DEFAULT_FILE', None)
        app.config.setdefault('MYSQL_USE_UNICODE', True)
        app.config.setdefault('MYSQL_CHARSET', 'utf8')
        app.config.setdefault('MYSQL_SQL_MODE', None)
        app.config.setdefault('MYSQL_CURSORCLASS', None)

        if hasattr(app, 'teardown_appcontext'):
            app.teardown_appcontext(self.teardown)
def init_app(self, app):
        """Initialize the `app` for use with this
        :class:`~flask_mysqldb.MySQL` class.
        This is called automatically if `app` is passed to
        :meth:`~MySQL.__init__`.

        :param flask.Flask app: the application to configure for use with
            this :class:`~flask_mysqldb.MySQL` class.
        """

        app.config.setdefault('MYSQL_HOST', 'localhost')
        app.config.setdefault('MYSQL_USER', None)
        app.config.setdefault('MYSQL_PASSWORD', None)
        app.config.setdefault('MYSQL_DB', None)
        app.config.setdefault('MYSQL_PORT', 3306)
        app.config.setdefault('MYSQL_UNIX_SOCKET', None)
        app.config.setdefault('MYSQL_CONNECT_TIMEOUT', 10)
        app.config.setdefault('MYSQL_READ_DEFAULT_FILE', None)
        app.config.setdefault('MYSQL_USE_UNICODE', True)
        app.config.setdefault('MYSQL_CHARSET', 'utf8')
        app.config.setdefault('MYSQL_SQL_MODE', None)
        app.config.setdefault('MYSQL_CURSORCLASS', None)

        if hasattr(app, 'teardown_appcontext'):
            app.teardown_appcontext(self.teardown)
def init_app ( self , app ) : app . config . setdefault ( 'MYSQL_HOST' , 'localhost' ) app . config . setdefault ( 'MYSQL_USER' , None ) app . config . setdefault ( 'MYSQL_PASSWORD' , None ) app . config . setdefault ( 'MYSQL_DB' , None ) app . config . setdefault ( 'MYSQL_PORT' , 3306 ) app . config . setdefault ( 'MYSQL_UNIX_SOCKET' , None ) app . config . setdefault ( 'MYSQL_CONNECT_TIMEOUT' , 10 ) app . config . setdefault ( 'MYSQL_READ_DEFAULT_FILE' , None ) app . config . setdefault ( 'MYSQL_USE_UNICODE' , True ) app . config . setdefault ( 'MYSQL_CHARSET' , 'utf8' ) app . config . setdefault ( 'MYSQL_SQL_MODE' , None ) app . config . setdefault ( 'MYSQL_CURSORCLASS' , None ) if hasattr ( app , 'teardown_appcontext' ) : app . teardown_appcontext ( self . teardown )
Initialize the `app` for use with this
        :class:`~flask_mysqldb.MySQL` class.
        This is called automatically if `app` is passed to
        :meth:`~MySQL.__init__`.

        :param flask.Flask app: the application to configure for use with
            this :class:`~flask_mysqldb.MySQL` class.
Initialize the app for use with this : class : ~flask_mysqldb . MySQL class . This is called automatically if app is passed to : meth : ~MySQL . __init__ .