|
|
@@ -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,9 @@ 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:]) |
|
|
|
@app.errorhandler(404) |
|
|
|
def error404(error): |
|
|
|
return render_template("error404.html"), 404 |
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
|
app.run(debug=True) |