mirror of
https://github.com/ilri/csv-metadata-quality-web.git
synced 2025-05-10 15:16:03 +02:00
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:
3
main.py
3
main.py
@ -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"])
|
||||||
|
Reference in New Issue
Block a user