summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaise Thompson <blaise@untzag.com>2019-11-09 20:08:26 -0600
committerBlaise Thompson <blaise@untzag.com>2019-11-09 20:08:26 -0600
commit0a526a560a44581047970a6f1057ca1d283499d9 (patch)
tree8dd5c6301c78fb727927784e48648269d6d9772f
parent114884595a2b12ed013fd98b10e7421783aed82f (diff)
blacken
-rw-r--r--setup.py4
-rw-r--r--shopdb/_base.py2
-rw-r--r--shopdb/app/__init__.py19
3 files changed, 11 insertions, 14 deletions
diff --git a/setup.py b/setup.py
index 2dfe48e..5f0c0c0 100644
--- a/setup.py
+++ b/setup.py
@@ -22,9 +22,7 @@ setup(
package_data=extra_files,
python_requires=">=3.7",
install_requires=[],
- extras_require={
- "dev": ["black", "pre-commit", "pydocstyle"],
- },
+ extras_require={"dev": ["black", "pre-commit", "pydocstyle"]},
version=version,
author="Blaise Thompson",
author_email="bthompson@chem.wisc.edu",
diff --git a/shopdb/_base.py b/shopdb/_base.py
index d337790..8033d28 100644
--- a/shopdb/_base.py
+++ b/shopdb/_base.py
@@ -4,5 +4,5 @@ __all__ = ["engine", "Base"]
import sqlalchemy
-engine = sqlalchemy.create_engine('sqlite:///:memory:', echo=True)
+engine = sqlalchemy.create_engine("sqlite:///:memory:", echo=True)
Base = sqlalchemy.ext.declarative.declarative_base
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")