def build(build_destination=None): """Create a static version of the site with Frozen-Flask""" from flaskext.frozen import Freezer if build_destination is not None: app.config['FREEZER_DESTINATION'] = build_destination else: app.config['FREEZER_DESTINATION'] = os.path.join(app.config["SOURCE"], "_build") freezer = Freezer(app) freezer.freeze()
def build(build_destination=None): """Create a static version of the site with Frozen-Flask""" try: from flaskext.frozen import Freezer except ImportError: import sys sys.exit("To create a static version of the site you need the " "Frozen-Flask package") if build_destination is not None: current_app.config['FREEZER_DESTINATION'] = build_destination else: current_app.config['FREEZER_DESTINATION'] = os.path.join( current_app.config["SOURCE"], "_build") freezer = Freezer(current_app) freezer.freeze()