def init_app(self, app):
        """Initialize extension to the given application.

        Extension will be registered to `app.extensions` with lower classname
        as key and instance as value.

        :param app: Flask application.
        """
        self.init_extension(app)

        if not hasattr(app, 'extensions'):
            app.extensions = {}
        classname = self.__class__.__name__
        extname = classname.replace('Flask', '').lower()
        app.extensions[extname] = self
Initialize extension to the given application.

        Extension will be registered to `app.extensions` with lower classname
        as key and instance as value.

        :param app: Flask application.