diff options
author | Blaise Thompson <blaise@untzag.com> | 2019-11-09 20:08:26 -0600 |
---|---|---|
committer | Blaise Thompson <blaise@untzag.com> | 2019-11-09 20:08:26 -0600 |
commit | 0a526a560a44581047970a6f1057ca1d283499d9 (patch) | |
tree | 8dd5c6301c78fb727927784e48648269d6d9772f /shopdb/app | |
parent | 114884595a2b12ed013fd98b10e7421783aed82f (diff) |
blacken
Diffstat (limited to 'shopdb/app')
-rw-r--r-- | shopdb/app/__init__.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/shopdb/app/__init__.py b/shopdb/app/__init__.py index 5e397e4..e5ac40c 100644 --- a/shopdb/app/__init__.py +++ b/shopdb/app/__init__.py @@ -8,14 +8,11 @@ import pandas __here__ = pathlib.Path(__file__).parent - df = pandas.read_csv(__here__ / "jobs.csv") - - app = Flask(__name__) -app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db' +app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:////tmp/test.db" db = SQLAlchemy(app) @@ -25,17 +22,19 @@ class User(db.Model): email = db.Column(db.String(120), unique=True) def __repr__(self): - return '<User %r>' % self.username + return "<User %r>" % self.username -@app.route('/') -@app.route('/jobs') + +@app.route("/") +@app.route("/jobs") def jobs(): - #return df.to_html() + # return df.to_html() return render_template("jobs.html", df=df.to_html()) -@app.route('/inventory') + +@app.route("/inventory") def inventory(): - #return df.to_html() + # return df.to_html() return render_template("inventory.html") |