diff --git a/app.py b/app.py index cf64f91..cd09cb5 100644 --- a/app.py +++ b/app.py @@ -12,7 +12,7 @@ from bitshift.database import Database from bitshift.languages import LANGS from bitshift.query import parse_query, QueryParseException -app = Flask(__name__) +app = Flask(__name__, static_folder="static", static_url_path="") app.config.from_object("bitshift.config") app.jinja_env.globals.update(year=datetime.datetime.now().year) @@ -56,11 +56,5 @@ def about(): def developers(): return render_template("developers.html") -@app.route("/robots.txt") -@app.route("/sitemap.xml") -@app.route("/favicon.ico") -def static_from_root(): - return flask.send_from_directory(app.static_folder, request.path[1:]) - if __name__ == "__main__": app.run(debug=True) diff --git a/bitshift/assets.py b/bitshift/assets.py index b4f597b..2b0145f 100644 --- a/bitshift/assets.py +++ b/bitshift/assets.py @@ -5,8 +5,8 @@ from flask import Markup ASSET_HTML_TEMPLATES = { - 'css': "", - 'js': "" + 'css': "", + 'js': "" } def tag(filename): diff --git a/static/img/favicon.ico b/static/favicon.ico similarity index 100% rename from static/img/favicon.ico rename to static/favicon.ico diff --git a/templates/layout.html b/templates/layout.html index f40c43e..ebdcdba 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -16,7 +16,6 @@ - {{ assets.tag("main.css") }} {{ assets.tag("main.js") }}