From bf332ee426e4bb1020b058c2d48757e3e89f1448 Mon Sep 17 00:00:00 2001 From: Benjamin Attal Date: Mon, 2 Jun 2014 16:51:29 -0400 Subject: [PATCH] Add mock python file. --- test/resources/app.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 test/resources/app.py diff --git a/test/resources/app.py b/test/resources/app.py new file mode 100644 index 0000000..3fae72f --- /dev/null +++ b/test/resources/app.py @@ -0,0 +1,40 @@ +""" +Module to contain all the project's Flask server plumbing. +""" + +from flask import Flask +from flask import render_template, session + +from bitshift import assets +# from bitshift.database import Database +# from bitshift.query import parse_query + +app = Flask(__name__) +app.config.from_object("bitshift.config") + +app_env = app.jinja_env +app_env.line_statement_prefix = "=" +app_env.globals.update(assets=assets) + +# database = Database() + +@app.route("/") +def index(): + return render_template("index.html") + +@app.route("/search/") +def search(query): + # tree = parse_query(query) + # database.search(tree) + pass + +@app.route("/about") +def about(): + return render_template("about.html") + +@app.route("/developers") +def developers(): + return render_template("developers.html") + +if __name__ == "__main__": + app.run(debug=True)