Add tag via val
This commit is contained in:
parent
5398ce9150
commit
9d3d0f8766
8
wsgi.py
8
wsgi.py
@ -1,5 +1,5 @@
|
||||
import pandas as pd
|
||||
from flask import Flask, render_template
|
||||
from flask import Flask, render_template, request
|
||||
|
||||
from download_digital import construct_dataframe
|
||||
|
||||
@ -9,8 +9,11 @@ app = Flask(__name__)
|
||||
@app.route("/")
|
||||
def tables(
|
||||
url: str = "https://beschaeftigtenbefragung.verdi.de/",
|
||||
tag: str = "bez_data_2",
|
||||
default_tag: str = "bez_data_2",
|
||||
):
|
||||
tag = request.args.get("tag")
|
||||
if tag is None:
|
||||
tag = default_tag
|
||||
df = construct_dataframe(url=url, tag=tag, grouped=False)
|
||||
|
||||
output_str = []
|
||||
@ -51,5 +54,6 @@ def tables(
|
||||
|
||||
return render_template("base.html", tables="\n".join(output_str))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user