--- a/service.py Sat Jun 10 17:00:53 2017 +0300 +++ b/service.py Sat Jun 10 17:20:51 2017 +0300 @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from flask import Flask, render_template, abort +from flask import Flask, render_template, abort, send_from_directory from datetime import datetime, date, time, timedelta from os import path, listdir from configparser import ConfigParser @@ -42,7 +42,7 @@ if request.args.get(language_name) is not None: return language_name else: - return None + return 'fi' @app.route('/pysäkki/<tunniste>') def pysäkkiaikataulu(tunniste): @@ -114,6 +114,10 @@ yö = yö(datetime.combine(tänään(), time()) + ajovuoro.reitti[-1].saapumisaika), ) +@app.route('/static/<path:path>') +def static_file(path): + return send_from_directory(path.join('static', path)) + if __name__ == '__main__': from argparse import ArgumentParser parser = ArgumentParser()