Browse Source

chemical schema

master
junikimm717 2 years ago
parent
commit
e47859dcb5
  1. 12
      app.py

12
app.py

@ -40,8 +40,20 @@ class Admin(db.Model):
if not session.get('admin'):
return redirect(url_for("admin_login"))
class Chemical(db.Model):
query: db.Query
id = db.Column(db.Integer, primary_key=True)
pubchem_cid = db.Column(db.Integer, nullable=False)
name = db.Column(db.String, nullable=False)
formula = db.Column(db.String, nullable=False)
mass = db.Column(db.Float, nullable=False)
mz = db.Column(db.Float, nullable=False)
rt = db.Column(db.Float, nullable=False)
# Error Handlers
@app.errorhandler(404)
def handler_404(msg):
return render_template("errors/404.html")

Loading…
Cancel
Save