main.py: Import csv_metadata_quality

Now I understand how I can use this, for example to print the vers-
ion of the CLI tool in the HTML template.
This commit is contained in:
Alan Orth 2021-03-11 20:29:43 +02:00
parent ee54096561
commit 4f1d6fad38
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -1,5 +1,6 @@
import os import os
from csv_metadata_quality.version import VERSION as cli_version
from flask import Flask, abort, redirect, render_template, request, url_for from flask import Flask, abort, redirect, render_template, request, url_for
from werkzeug.utils import secure_filename from werkzeug.utils import secure_filename
@ -11,7 +12,7 @@ app.config["UPLOAD_PATH"] = "/tmp"
@app.route("/") @app.route("/")
def index(): def index():
return render_template("index.html") return render_template("index.html", cli_version=cli_version)
@app.route("/", methods=["POST"]) @app.route("/", methods=["POST"])