app.config["FLATPAGES_EXTENSION"] = ".md" app.config["FLATPAGES_MARKDOWN_EXTENSIONS"] = [ "fenced_code", "tables", "codehilite", 'toc' ] app.config["FLATPAGES_EXTENSION_CONFIG"] = { "fenced_code": {}, "tables": {}, "codehilite": { "guess_lang": False, } } app.config.from_pyfile(os.environ["FLASK_CONFIG"]) r = redis.Redis.from_url(app.config["REDIS_URL"]) menu.Menu(app=app) github = GitHub(app) csrf = CSRFProtect(app) mail = Mail(app) pages = FlatPages(app) babel = Babel(app) gravatar = Gravatar(app, size=58, rating="g", default="mp", force_default=False, force_lower=False, use_ssl=True, base_url=None) login_manager = LoginManager()
def init_flask_plugins(self): # Add flask menu flask_menu.Menu(app=self.flask_app)