Config template

This commit is contained in:
2023-06-07 01:38:03 +02:00
parent f0c8d51682
commit 3a6f831da8
3 changed files with 25 additions and 3 deletions

View File

@@ -1,8 +1,10 @@
import os
import dotenv
from benchmark.utils import Files
from flask import (
Blueprint,
render_template,
current_app,
url_for,
flash,
redirect,
@@ -56,7 +58,10 @@ def set_benchmark(benchmark_id):
@main.route("/config")
@login_required
def config():
return render_template("config.html")
os.chdir(current_user.benchmark.folder)
env = dotenv.dotenv_values(".env")
print(env)
return render_template("config.html", config_env=env)
@main.route("/login", methods=["GET", "POST"])