<s> from flask import ( Blueprint , render_template , g , request , url_for , <EOL> current_app , send_from_directory , json , redirect , make_response , abort ) <EOL> from flask . ext . login import login_required <EOL> from . . extensions import pages , csrf <EOL> from . . tasks import do_some_stuff <EOL> frontend = Blueprint ( '<STR_LIT>' , __name__ , template_folder = "<STR_LIT>" ) <EOL> @ frontend . route ( '<STR_LIT:/>' ) <EOL> def index ( ) : <EOL> do_some_stuff . delay ( ) <EOL> return render_template ( '<STR_LIT>' ) <EOL> @ frontend . route ( '<STR_LIT>' , defaults = { '<STR_LIT:path>' : '<STR_LIT:index>' } ) <EOL> @ frontend . route ( '<STR_LIT>' , endpoint = '<STR_LIT>' ) <EOL> def page ( path ) : <EOL> _page = pages . get_or_404 ( path ) <EOL> return render_template ( '<STR_LIT>' , page = _page ) <EOL> @ frontend . route ( '<STR_LIT>' ) <EOL> def static_from_root ( ) : <EOL> return send_from_directory ( current_app . static_folder , request . path [ <NUM_LIT:1> : ] ) <EOL> @ frontend . route ( '<STR_LIT>' ) <EOL> def favicon ( ) : <EOL> return redirect ( '<STR_LIT>' ) </s>
