def init_app(self, app):

        config = app.config.copy()

        self.debug = config.get('PONYWHOOSH_DEBUG', self.debug)
        self.indexes_path = config.get('PONYWHOOSH_INDEXES_PATH',  self.indexes_path)
        self.search_string_min_len = config.get('PONYWHOOSH_MIN_STRING_LEN', self.search_string_min_len)
        self.writer_timeout = config.get('PONYWHOOSH_WRITER_TIMEOUT', self.writer_timeout)
        self.url_route = config.get('PONYWHOOSH_URL_ROUTE', self.url_route)
        self.template_path = config.get('PONYWHOOSH_TEMPLATE_PATH', self.template_path)

        if self.debug:
            print 'PONYWHOOSH_DEBUG -> ', self.debug
            print 'PONYWHOOSH_INDEXES_PATH  -> ', self.indexes_path
            print 'PONYWHOOSH_MIN_STRING_LEN  -> ', self.search_string_min_len
            print 'PONYWHOOSH_WRITER_TIMEOUT -> ', self.writer_timeout
            print 'PONYWHOOSH_TEMPLATE_PATH -> ', self.template_path
            print 'PONYWHOOSH_URL_ROUTE -> ',  self.url_route

        loader = jinja2.ChoiceLoader([
            app.jinja_loader,
            jinja2.FileSystemLoader(self.template_path)
        ])

        app.jinja_loader = loader
        app.add_url_rule(
            self.url_route,
            view_func=IndexView.as_view('ponywhoosh/', pw=self)
        )
Initializes the App.
dataset/ETHPy150Open compiteing/flask-ponywhoosh/flask_ponywhoosh/__init__.py/PonyWhoosh.init_app