two graphs
This commit is contained in:
parent
9baa648382
commit
cd3bf25fa1
@ -37,14 +37,6 @@ oidc = OpenIDConnect(app)
|
||||
@app.route('/')
|
||||
@oidc.require_login
|
||||
def index():
|
||||
counter = int(session.get('counter', '0'))
|
||||
counter += 1
|
||||
session['counter'] = f"{counter}"
|
||||
return f"Hello, Flask! Called for the {counter}. time."
|
||||
|
||||
@app.route('/plot')
|
||||
@oidc.require_login
|
||||
def plot():
|
||||
try:
|
||||
dbh = psycopg.connect()
|
||||
engine = sqlalchemy.create_engine("postgresql+psycopg://", creator=lambda: dbh)
|
||||
@ -71,6 +63,7 @@ def plot():
|
||||
</head>
|
||||
<body>
|
||||
{graph_html}
|
||||
{graph_html}
|
||||
</body>
|
||||
</html>
|
||||
""")
|
||||
|
Loading…
x
Reference in New Issue
Block a user