def before_init_app(self, app: FlaskUnchained):
        """
        Configure the Jinja environment and template loader.
        """
        from .templates import (UnchainedJinjaEnvironment,
                                UnchainedJinjaLoader)
        app.jinja_environment = UnchainedJinjaEnvironment
        app.jinja_options = {**app.jinja_options,
                             'loader': UnchainedJinjaLoader(app)}
        app.jinja_env.globals['url_for'] = url_for

        for name in ['string', 'str']:
            app.url_map.converters[name] = StringConverter
def before_init_app ( self , app : FlaskUnchained ) : from . templates import ( UnchainedJinjaEnvironment , UnchainedJinjaLoader ) app . jinja_environment = UnchainedJinjaEnvironment app . jinja_options = { ** app . jinja_options , 'loader' : UnchainedJinjaLoader ( app ) } app . jinja_env . globals [ 'url_for' ] = url_for for name in [ 'string' , 'str' ] : app . url_map . converters [ name ] = StringConverter
Configure the Jinja environment and template loader.